| From: | Michael Glaesemann <grzm(at)seespotcode(dot)net> |
|---|---|
| To: | Tony Caduto <tony_caduto(at)amsoftwaredesign(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: PostgreSQL vs Firebird feature comparison finished |
| Date: | 2007-08-27 17:04:10 |
| Message-ID: | F62FF999-3240-4BA3-BCE0-30C20274CBF0@seespotcode.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Martijn van Oosterhout | 2007-08-27 17:04:28 | Re: Tables dissapearing |
| Previous Message | Kamil Srot | 2007-08-27 16:57:54 | Re: Tables dissapearing |