pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark McEahern <mark@mceahern.com>
To: pgsql-admin@postgresql.org
Subject: configure datatype name > 31?
Date: Fri, 3 May 2002 10:12:09 -0500
Message-ID: <NCBBLFCOHHDIKCAFGCFBKEBKKOAA.mark@mceahern.com> (raw)

Hi, the name datatype, which is used at least here:

	pg_database.datname
	pg_shadow.usename

is a 31 character field.  That seems awfully low.  For instance, what if I'm
silly enough to want to make a database named:

	customer_GUID

where GUID is something like:

	0ff7d0cc-7394-4b15-a28e-7018b1056f9c

You can imagine I have many customers, each with their own database; since I
use a guid to distinguish the customers, it makes most sense to me to use a
guid to distinguish their databases.

Since GUIDs (in that form at least) are 36 characters, I'm already SOL.  I
can condense the data, but I'd really much rather just use it like it is.

SQL Server 2000, for example, uses nvarchar(256) for the sysname field,
which seems to perform a similar function.

Is there a way to configure PostgreSQL to make the name field larger?

Thanks,

// mark




view thread (9+ messages)  latest in thread

Message-ID: <NCBBLFCOHHDIKCAFGCFBKEBKKOAA.mark@mceahern.com>
Permalink:  ../NCBBLFCOHHDIKCAFGCFBKEBKKOAA.mark@mceahern.com/
Also on:    postgresql.org/message-id/NCBBLFCOHHDIKCAFGCFBKEBKKOAA.mark@mceahern.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: mark@mceahern.com
  Subject: Re: configure datatype name > 31?
  In-Reply-To: <NCBBLFCOHHDIKCAFGCFBKEBKKOAA.mark@mceahern.com>
  References: <NCBBLFCOHHDIKCAFGCFBKEBKKOAA.mark@mceahern.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox