Fri Aug 20 12:10:46 PDT 2004
- Previous message: [Slony1-general] OIDs as primary keys
- Next message: [Slony1-general] OIDs as primary keys
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 8/19/2004 11:47 PM, Darren wrote: > Hello, > > I ran across something today when trying to use oids as primary keys. The slon > daemon will create SQL like this this: > UPDATE table_name SET field = value WHERE ; > > with no clause for the where. Of course this fails. > Is this just something that shouldn't be done? Or might slony be able to make > use of tables that use the oid as a primary key? I ask mainly because using > the oid is an easy way to retrofit a primary key onto existing tables in a > clean manner. Using OID's as primary keys is neither clean, nor reliable. Do not get fooled by the fact that most of the system catalogs use OID's for their primary key. If you use OID's for your data primary keys, you not only start running through them at a higher rate, you also force yourself into a situation where you cannot cleanup your system even with a dump and restore in the case where your OID counter rolls over. And believe me, a rollover of the OID counter isn't funny. A lot of special logic would be necessary to support system attributes as row identifiers in slony. I don't have any plans to do so. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck at Yahoo.com #
- Previous message: [Slony1-general] OIDs as primary keys
- Next message: [Slony1-general] OIDs as primary keys
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list