Re: [HACKERS] BUG? serials and primary keys (was Re: [INTERFACES] Bug in psql?) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] BUG? serials and primary keys (was Re: [INTERFACES] Bug in psql?)
Date
Msg-id 25380.926531607@sss.pgh.pa.us
Whole thread Raw
In response to BUG? serials and primary keys (was Re: [INTERFACES] Bug in psql?)  ("Ross J. Reedstrom" <reedstrm@rice.edu>)
List pgsql-hackers
"Ross J. Reedstrom" <reedstrm@rice.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, likepg_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


pgsql-hackers by date:

Previous
From: jwieck@debis.com (Jan Wieck)
Date:
Subject: WHERE vs HAVING
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] WHERE vs HAVING