Re: PostgreSQL vs Firebird feature comparison finished - Mailing list pgsql-general

From Michael Glaesemann
Subject Re: PostgreSQL vs Firebird feature comparison finished
Date
Msg-id F62FF999-3240-4BA3-BCE0-30C20274CBF0@seespotcode.net
Whole thread Raw
In response to Re: PostgreSQL vs Firebird feature comparison finished  (Tony Caduto <tony_caduto@amsoftwaredesign.com>)
List pgsql-general
On Aug 27, 2007, at 11:47 , Tony Caduto wrote:

> Good call on the name limit, I remember running into that when
> porting something from MS SQL server to Firebird about 4 years ago.

Just a quick note: PostgreSQL's identifiers are limited to
NAMEDATALEN - 1 (IIRC), which by default is 64 - 1 = 63 characters:

test=# create table a
(a23456789112345678921234567893123456789412345678951234567896123 text
primary key);
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"a_pkey" for table "a"
CREATE TABLE
test=# create table b
(a234567891123456789212345678931234567894123456789512345678961234
text primary key);
NOTICE:  identifier
"a234567891123456789212345678931234567894123456789512345678961234"
will be truncated to
"a23456789112345678921234567893123456789412345678951234567896123"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"b_pkey" for table "b"
CREATE TABLE

The upshot is that PostgreSQL does have a limit, but it's pretty big
initially and is configurable at compilation by changing the
definition of NAMEDATALEN in in src/include/postgres_ext.h.

Michael Glaesemann
grzm seespotcode net



pgsql-general by date:

Previous
From: Kamil Srot
Date:
Subject: Re: Tables dissapearing
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Tables dissapearing