Re: [INTERFACES] Bug in psql? - Mailing list pgsql-interfaces

From Thomas Lockhart
Subject Re: [INTERFACES] Bug in psql?
Date
Msg-id 3738381F.46313B9F@alumni.caltech.edu
Whole thread Raw
In response to Re: [INTERFACES] Bug in psql?  (leif@danmos.dk)
List pgsql-interfaces
> > >  I tried to create the table below using psql, but it bombed out
> > > with a message about loosing the backend, though the backend was
> > > still running nicely. It seems to be a problem with the long
> > > field name of the serial (and primary key) column.
>    I tried to change the name of the serial field: globalafvigelse -> id,
> and then it works. I think it is because postgresql automatically creates a
> sequence called <table name>_<field name>_seq, which is limited in size.

>From the current v6.5 prerelease:

postgres=> create table globalafvigelse
postgres-> (globalafvigelse serial ,
postgres-> startdato date,
postgres-> slutdato date,
postgres-> dagskema varchar(50),
postgres-> primary key (globalafvigelse)
postgres-> );
ERROR:  CREATE TABLE/SERIAL implicit sequence name must be less than
32 characters       Sum of lengths of 'globalafvigelse' and 'globalafvigelse' must
be less than 27

Sorry, the thread subject didn't catch my attention. Older code didn't
check length, as you surmised.
                            - Tom

-- 
Thomas Lockhart                lockhart@alumni.caltech.edu
South Pasadena, California


pgsql-interfaces by date:

Previous
From: Peter Harvey
Date:
Subject: ODBC
Next
From: Tom Lane
Date:
Subject: Re: [INTERFACES] Bug in psql?