activerecord, postgres and views?

B

_blackdog

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

BD
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top