Allowing for longer table names (>64 characters)

Started by Allan Kamauover 16 years ago6 messagesgeneral
Jump to latest
#1Allan Kamau
kamauallan@gmail.com

Hi all,
I would like to increase the database objects names limit from 64
characters to may be 128 characters to avoid name conflicts after
truncation of long table/sequence names.
I have seen a solution to this sometime back which includes (building
from source) modifying a header file then recompiling, but I now
cannot find this information.

Allan.

#2A. Kretschmer
andreas.kretschmer@schollglas.com
In reply to: Allan Kamau (#1)
Re: Allowing for longer table names (>64 characters)

In response to Allan Kamau :

Hi all,
I would like to increase the database objects names limit from 64
characters to may be 128 characters to avoid name conflicts after
truncation of long table/sequence names.
I have seen a solution to this sometime back which includes (building
from source) modifying a header file then recompiling, but I now
cannot find this information.

In the source-tree, src/include/pg_config_manual.h , change NAMEDATALEN.
But i think it's a bad idea ... 64 characters are enough for me.

Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431 2EB0 389D 1DC2 3172 0C99

#3Allan Kamau
kamauallan@gmail.com
In reply to: A. Kretschmer (#2)
Re: Allowing for longer table names (>64 characters)

On Fri, Nov 20, 2009 at 11:21 AM, A. Kretschmer
<andreas.kretschmer@schollglas.com> wrote:

In response to Allan Kamau :

Hi all,
I would like to increase the database objects names limit from 64
characters to may be 128 characters to avoid name conflicts after
truncation of long table/sequence names.
I have seen a solution to this sometime back which includes (building
from source) modifying a header file then recompiling, but I now
cannot find this information.

In the source-tree, src/include/pg_config_manual.h , change NAMEDATALEN.
But i think it's a bad idea ... 64 characters are enough for me.

Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431  2EB0 389D 1DC2 3172 0C99

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Thanks Andreas, I too agree it may not be a good idea to have long for
various reasons including porting/upgrading issues and so on, as I
have many tables, I seem to have been caught up in describing table
functionality in the table name :-)

Allan.

#4A. Kretschmer
andreas.kretschmer@schollglas.com
In reply to: Allan Kamau (#3)
Re: Allowing for longer table names (>64 characters)

In response to Allan Kamau :

Thanks Andreas, I too agree it may not be a good idea to have long for
various reasons including porting/upgrading issues and so on, as I
have many tables, I seem to have been caught up in describing table
functionality in the table name :-)

The table-name is the wrong place for comments, use

comment on table foo is 'my comment';

instead.

Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431 2EB0 389D 1DC2 3172 0C99

#5Tino Wildenhain
tino@wildenhain.de
In reply to: Allan Kamau (#3)
Re: Allowing for longer table names (>64 characters)

Hi Allan,

Am 20.11.2009 10:42, schrieb Allan Kamau:
...

Thanks Andreas, I too agree it may not be a good idea to have long for
various reasons including porting/upgrading issues and so on, as I
have many tables, I seem to have been caught up in describing table
functionality in the table name :-)

As Andreas said, comment is perhaps a better place for descriptions.

Also did you thought of using schema as additional grouping system to
avoid having many overly descriptive table names?

Regards
Tino

Attachments:

smime.p7sapplication/pkcs7-signature; name=smime.p7sDownload
#6Bret Stern
bret_stern@machinemanagement.com
In reply to: Allan Kamau (#3)
Re: Allowing for longer table names (>64 characters)

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Allan Kamau
Sent: Friday, November 20, 2009 1:42 AM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Allowing for longer table names (>64
characters)

On Fri, Nov 20, 2009 at 11:21 AM, A. Kretschmer
<andreas.kretschmer@schollglas.com> wrote:

In response to Allan Kamau :

Hi all,
I would like to increase the database objects names limit from 64
characters to may be 128 characters to avoid name conflicts after
truncation of long table/sequence names.
I have seen a solution to this sometime back which

includes (building

from source) modifying a header file then recompiling, but I now
cannot find this information.

In the source-tree, src/include/pg_config_manual.h , change

NAMEDATALEN.

But i think it's a bad idea ... 64 characters are enough for me.

Andreas
--
Andreas Kretschmer
Kontakt: �Heynitz: 035242/47150, � D1: 0160/7141639 (mehr:

-> Header)

GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431 �2EB0 389D 1DC2

3172 0C99

--
Sent via pgsql-general mailing list

(pgsql-general@postgresql.org) To

make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Thanks Andreas, I too agree it may not be a good idea to have
long for various reasons including porting/upgrading issues
and so on, as I have many tables, I seem to have been caught
up in describing table functionality in the table name :-)

Allan.

--
Sent via pgsql-general mailing list
(pgsql-general@postgresql.org) To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

I can't imagine naming a table like you describe. A "users" table
name is pretty clear.

I would love to see an example of this. You should probably
get "un-caught-up" in using this concept. Perhaps reading about
an existing model (ie; hungarian notation) and tweak it to fit
your needs.

But hey..maybe you're on to a new thing.

Bret