Rails with postgres-oids?


#1

Hello!

Postgres supports oids which is a unique number for any row in a given
database. There is the ‘id’ already inside oids - wouldnt it be nice and
handy to turn on some global environemt.rb or database.yaml magic-switch
and rails uses the oids internally and transparently on the postgresql
adapter, sparing people the need to create auto-increment-serial ids
with postgres databases?

Regards
Philipp


#2

row OIDs work best only for internals - pg_catalog tables, for example.
don’t use them as primary keys for your tables - it’s ugly and is
discouraged.
(and recent versions of PostgreSQL have WITHOUT OIDS as default
option for CREATE TABLE)