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
I will be using the PG interface instead since using ActiveRecord doesn't seem to easily allow me to see the OIDs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With