On Mon, Aug 15, 2005 at 10:02:01AM -0500, Tony Caduto wrote:
> Just had a quick question about the name type used by pg_proc and 
> pg_class etc to return the name of a function,table,seq,view etc.
> 
> Is this type limited to 64  bytes?  ( could not find it in the docs)

See the "Character Types" section of the "Data Types" chapter:

http://www.postgresql.org/docs/8.0/static/datatype-character.html

"The name type exists _only_ for storage of identifiers in the internal
system catalogs and is not intended for use by the general user.  Its
length is currently defined as 64 bytes (63 usable characters plus
terminator) but should be referenced using the constant NAMEDATALEN.
The length is set at compile time (and is therefore adjustable for
special uses); the default maximum length may change in a future
release."

> Must  function/table names be limited to 64 characters in length?

See "Identifiers and Key Words" in the "SQL Syntax" chapter:

http://www.postgresql.org/docs/8.0/static/sql-syntax.html#SQL-SYNTAX-IDENTIFIERS

"The system uses no more than NAMEDATALEN-1 characters of an identifier;
longer names can be written in commands, but they will be truncated.  By
default, NAMEDATALEN is 64 so the maximum identifier length is 63."

-- 
Michael Fuhr

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to