Received: from mail.crysberg.dk (root@square.crysberg.dk [194.192.196.2]) by hub.org (8.9.3/8.9.3) with ESMTP id JAA14132 for ; Tue, 11 May 1999 09:21:39 -0400 (EDT) (envelope-from leif@danmos.dk) From: leif@danmos.dk Received: from crysberg.dk (root@samba.crysberg.dk [194.192.196.12]) by mail.crysberg.dk (8.8.5/8.8.5) with ESMTP id PAA14748 for ; Tue, 11 May 1999 15:26:42 +0200 Received: from danmos.dk (cdslj.crysberg.dk [194.192.196.20]) by crysberg.dk (8.8.7/8.8.7) with SMTP id PAA18600 for ; Tue, 11 May 1999 15:21:33 +0200 Date: Tue, 11 May 1999 15:21:33 +0200 Message-Id: <199905111321.PAA18600@crysberg.dk> To: pgsql-interfaces@postgreSQL.org Subject: Re: [INTERFACES] Bug in psql? Content-Type: text Hello Bruce, On: Tue, 11 May 1999 08:50:07 -0400 (EDT) Bruce Tong wrote: > > 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. > > > Have you tried putting the following into a file and using... > > # psql -f foo.sql I actually did from a file, but with the \i command. > > ... to run it? I _think_ this sometimes gives different messages than > entering it directly on the psql command line, although I'm not sure why. > I could be way off here, but its worth a try. > > > create table globalafvigelse > > ( > > globalafvigelse serial , > > startdato date, > > slutdato date, > > dagskema varchar(50), > > primary key (globalafvigelse) > > ); > > What is type "serial"? It probably not incorrect, but I've not heard of it > before. > The data type serial is a standard data type, which is also included in PostgreSQL ;-). M$Access calls it 'Autonumber' and is simply an integer (I think it is most common to be an int4) that is automatically incremented for each insert. I think that it is implemented in PostgreSQL using a sequenser. 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 __seq, which is limited in size. Greetings, Leif