pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
To: leif@danmos.dk
Cc: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] Bug in psql?
Date: Tue, 11 May 1999 14:01:03 +0000
Message-ID: <3738381F.46313B9F@alumni.caltech.edu> (raw)
References: <199905111321.PAA18600@crysberg.dk>

> > >  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



view thread (10+ messages)  latest in thread

Message-ID: <3738381F.46313B9F@alumni.caltech.edu>
Permalink:  ../3738381F.46313B9F@alumni.caltech.edu/
Also on:    postgresql.org/message-id/3738381F.46313B9F@alumni.caltech.edu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: lockhart@alumni.caltech.edu, leif@danmos.dk
  Subject: Re: [INTERFACES] Bug in psql?
  In-Reply-To: <3738381F.46313B9F@alumni.caltech.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox