pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Zalman Stern <zalman@netcom.com>
To: maillist@candle.pha.pa.us
Cc: zalman@netcom.com
Cc: tpham@mail.priority.net
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] Column name's length
Date: Tue, 1 Jun 1999 00:33:30 -0700 (PDT)
Message-ID: <199906010733.AAA00923@netcom12.netcom.com> (raw)
In-Reply-To: <199906010636.CAA17071@candle.pha.pa.us>

> And I assume it is working fine?

Yes. It fixes the column length too I think. The following is a psql
interaction:
-----
ssmldb=> create table
more_than_64_bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
(more_than_32_bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb boolean ) ;
CREATE
ssmldb=> select * from
more_than_64_bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
;
more_than_32_bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
---------------------------------------------
(0 rows)
ssmldb=> insert into
more_than_64_bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
( more_than_32_bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ) values ( true ) ;
INSERT 25353 1
ssmldb=> select * from
more_than_64_bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
;
^Mmore_than_32_bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
---------------------------------------------
t
(1 row)
-----
(I did some tests to make sure all the characters are significant. They
are.)

Here are the two diffs that up the "name size" from 32 characters to 256
characters. (Once I get bit, I try to fix things real good so I don't get
bit again :-))
-----
diff  postgresql-6.4.2/src/include/postgres_ext.h postgres-build/src/include/postgres_ext.h
34c34
< #define NAMEDATALEN 32
---
> #define NAMEDATALEN 256
37c37
< #define OIDNAMELEN    36
---
> #define OIDNAMELEN    260
-----
diff postgresql-6.4.2/src/include/storage/buf_internals.h postgres-build/src/include/storage/buf_internals.h
87c87
< #define PADDED_SBUFDESC_SIZE  128
---
> #define PADDED_SBUFDESC_SIZE  1024
-----

After this, I did a clean build. I am pretty sure this produces a Postgres
that *is not* binary compatible with existing databases. You have to do the
dump/reload thing. (We discovered this issue very early on so I was able to
trash all my existing databases and start from scratch.)

I do not know what performance or space usage impact this has. If it is not
too terrible, this would be a great change to see in a future version of
Postgres.

-Z-




view thread (17+ messages)  latest in thread

Message-ID: <199906010733.AAA00923@netcom12.netcom.com>
Permalink:  ../199906010733.AAA00923@netcom12.netcom.com/
Also on:    postgresql.org/message-id/199906010733.AAA00923@netcom12.netcom.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: zalman@netcom.com, maillist@candle.pha.pa.us, tpham@mail.priority.net
  Subject: Re: [SQL] Column name's length
  In-Reply-To: <199906010733.AAA00923@netcom12.netcom.com>
  References: <199906010636.CAA17071@candle.pha.pa.us> <199906010733.AAA00923@netcom12.netcom.com>

* 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