Subject: now, a question on field lengths

From: John Peter Lee <[email-masked]>
Date: Thu, 18 Nov 1993 17:28:54 -0500 (EST)

Hi:

   I know that Postgres has a limit of 16 characters for relations.
   We have made relations with 16-character names in the past.

   What is the limit for field names within a relation ???

   We think it is 15, not 16, as we had some problems retrieving
   from a DB with a field name that was 16 characters long.

   The error received was:
    
	artiste> !mon
	mon Finance
	Welcome to the C POSTGRES terminal monitor

	Go 
	* retrieve (comp_real_data.all)\g

	Error: Unexpected identfier in dump_data: p

   We made the 16-char string a 15-char string at relation create,
   and did not get the error upon a retrieve.

   Can you please clarify this ?

   thanks,

   jp

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
JP Lee               Institute for Visualization and Perception Research	
[email-masked]                    University of Massachusetts at Lowell 
(508) 934-3384			      1 University Ave. Lowell, MA 01854

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

---

From: [email-masked] (Paul M. Aoki)
Date: Thu, 18 Nov 93 15:12:59 -0800

>    from a DB with a field name that was 16 characters long.

the length of all identifiers is 16.  the data structure that stores
names is NOT null-terminated.  there are several hunks of code written
by people who did not understand this last (rather important) point.

i personally don't use any identifier longer than 15 characters; this
is a really embarrassing problem that is one of my pet peeves and one 
of our ongoing cleanup projects.
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  [email-masked]
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki