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: 368920B2.60641FD6@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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
characters
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 Content-Type Size
analyze.c.patch text/plain 4.4 KB

In response to

Browse pgsql-hackers by date

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