Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] bug with long serial names

From: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
To: Nat Howard <Nat(dot)Howard(at)cello-us(dot)com>, pgsql-hackers(at)postgreSQL(dot)org, Postgres Patches List <patches(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] bug with long serial names
Date: 1998-12-29 18:34:26
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
> > create table a12345678901234567890 ( b1234567890  serial );
> > causes this:
> > pqReadData() -- backend closed the channel unexpectedly.
> The upper limit on names is probably something like
>    <table name length> + <column name length> + 5 <= 31

Here is a patch which should catch the problem:

pg=> create table a12345678901234567890 ( b1234567890  serial );
ERROR:  CREATE TABLE/SERIAL implicit sequence name must be less than 32
        Sum of lengths of 'a12345678901234567890' and 'b1234567890' must
be less than 27

Will be in the next release. Apply the patch by putting it into the
backend/parser/ directory, then typing:

  patch < analyze.c.patch

btw, the patch should apply cleanly but with offsets since my source
code has some other changes you will not want (yet).

                       - Tom

Attachment: analyze.c.patch
Description: text/plain (4.4 KB)

In response to

pgsql-hackers by date

Next:From: Thomas G. LockhartDate: 1998-12-29 18:41:57
Subject: Re: [HACKERS] cvsup message
Previous:From: The Hermit HackerDate: 1998-12-29 18:32:29
Subject: Re: [HACKERS] cvsup message

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group