Re: [HACKERS] BUG? serials and primary keys (was Re: [INTERFACES] Bug in psql?)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>
Cc: "pgsql-hackers(at)postgreSQL(dot)org" <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] BUG? serials and primary keys (was Re: [INTERFACES] Bug in psql?)
Date: 1999-05-12 17:53:27
Message-ID: 25380.926531607@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Ross J. Reedstrom" <reedstrm(at)rice(dot)edu> writes:
> Any problem with truncating the field name?

I don't need to test it to see the problem with that idea:

create table averylongtablename (
averylongfieldname1 serial,
averylongfieldname2 serial);

We'd need to add code to ensure uniqueness of the truncated names,
which is doable but it's not a trivial change.

Another possibility is to use user-unfriendly names for the subsidiary
objects, like
pg_serial_seq_69845873
but I can't say that I like that either... it's nice to be able to
look at a sequence and know what it's for...

> Hmm, this raises another point: problem with serial in 6.4.2 with
> MixedCase table of field names (wrapped for your email viewing
> pleasure):

Yes, that was reported recently --- I believe Thomas is looking at it.

regards, tom lane

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-05-12 18:06:59 Re: [HACKERS] WHERE vs HAVING
Previous Message Jan Wieck 1999-05-12 17:51:18 WHERE vs HAVING