Forum: Ruby activerecord, postgres and views?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
_blackdog (Guest)
on 2006-01-11 13:38
(Received via mailing list)
hi there

is it possible to use a postgres view in AR?

this code is being executed by AR to find a relation

SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc,
a.attnotnull              FROM pg_attribute a LEFT JOIN pg_attrdef d
                ON a.attrelid = d.adrelid AND a.attnum = d.adnum
             WHERE a.attrelid = 'iptrack'::regclass
               AND a.attnum > 0 AND NOT a.attisdropped
             ORDER BY a.attnum

but it does not find my view "iptrack".

i realise i may not be able to update my view without postgres rewrite
rules, but I think i should be able to do searches on a view

thanks for any help

_blackdog (Guest)
on 2006-01-11 13:50
(Received via mailing list)
sorry for the prior post, my mistake!
This topic is locked and can not be replied to.