Re: [GENERAL] Length of field names. - Mailing list pgsql-general

From Bruce Momjian
Subject Re: [GENERAL] Length of field names.
Date
Msg-id 199807131745.NAA19947@candle.pha.pa.us
Whole thread Raw
In response to [GENERAL] Length of field names.  (Stuart Rison <stuart@NOJUNK_ludwig.ucl.ac.uk>)
Responses Re: [GENERAL] Length of field names.  (Stuart Rison <stuart@NOJUNK_ludwig.ucl.ac.uk>)
List pgsql-general
> So my guess is that with the original name, malignant_pathologies_invasive
> and the primary key created by it (normally
> malignant_pathologies_invasive_pkey) end up having the same name because of
> the cut-off?
>
> Does this seem right?  If so, what is the max length of field names and can
> anyone suggest a way around this problem (obviously I could just give the
> tables shorter names but they are computer generated by a Perl script and
> if at all possible, I'd like to keep the filed and table names in this long
> format).

max length is 31.

> PS.  For those that have been following the \dt <regex> discussion, in this
> case I would have like a '\d \dt' kind of query to get PG to give me the
> type and length of the Field field (which is more of an SQL query type of
> question so probably would have required SQL access to catalog tables as
> Herouth suggested).

Huh?  Doesn't \d \dt do that if you supply the table name?

--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

pgsql-general by date:

Previous
From: Stuart Rison
Date:
Subject: [GENERAL] Length of field names.
Next
From: Stuart Rison
Date:
Subject: Re: [GENERAL] Length of field names.