Re: [INTERFACES] Bug in psql?

Поиск
Список
Период
Сортировка
От Thomas Lockhart
Тема Re: [INTERFACES] Bug in psql?
Дата
Msg-id 3738381F.46313B9F@alumni.caltech.edu
обсуждение исходный текст
Ответ на Re: [INTERFACES] Bug in psql?  (leif@danmos.dk)
Список 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 по дате отправления:

Предыдущее
От: Peter Harvey
Дата:
Сообщение: ODBC
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [INTERFACES] Bug in psql?