Reputation: 599
I'm new to Ruby and ActiveRecord, so if this is a dumb question...sorry.
I have a Postgres database table that has path names in it. I need to be to do a find on a specific path and get the OID (the table is defined with: set_default_oids = true). The problem is that I can add a select("oid,path") but I never get the OID. I do get the path, but I need the OID.
I am assuming that there's some adapter option, or option for the table class, to say: Use OIDs, but I haven't been able to find it.
When I look at a result from a find, I can look at the object_id, but that appears to be something internal to ActiveRecord and has nothing to do with the OID. When using psql I can do:
db=# SELECT oid,path FROM path_table;
And I see the correct OIDs. So I know they're there...
Any suggestions?
Rob
Upvotes: 3
Views: 294
Reputation: 599
I will be using the PG interface instead since using ActiveRecord doesn't seem to easily allow me to see the OIDs.
Upvotes: 1