pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steve Crawford <scrawford@pinpointresearch.com>
To: Chris Hoover <revoohc@gmail.com>
Cc: pgsql-admin@postgresql.org Admin <pgsql-admin@postgresql.org>
Subject: Re: All numeric database names?
Date: Tue, 08 Jan 2008 12:59:11 -0800
Message-ID: <4783E41F.6040608@pinpointresearch.com> (raw)
In-Reply-To: <1d219a6f0801081103m183c00a2k38c3e01b99b7b48b@mail.gmail.com>
References: <1d219a6f0801081103m183c00a2k38c3e01b99b7b48b@mail.gmail.com>

Chris Hoover wrote:
> Just wanted to check, are there any problems/gotcha's to having a 
> cluster of all numeric database names?  We are thinking of switching 
> our database naming system to use our customer number (a 6 digit 
> integer) for the database name.  Is a negative/bad thing?
Technically speaking, it will be of data type "name". You can use all 
digits for the database name as you can with tables and columns (create 
table "1" ("2" text);) but you may run into places where you have to 
quote the name. For instance, in psql you might need to switch databases 
with:

\c "123456"

instead of

\c 123456

Alternately, you could prepend 1+ alpha characters to the customer 
numbers to create names like c123456 or cust123456 which don't need to 
be quote-enclosed. Personally, I try to avoid reserved words and 
anything else that requires special handling.

Cheers,
Steve




view thread (3+ messages)  latest in thread

Message-ID: <4783E41F.6040608@pinpointresearch.com>
Permalink:  ../4783E41F.6040608@pinpointresearch.com/
Also on:    postgresql.org/message-id/4783E41F.6040608@pinpointresearch.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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: scrawford@pinpointresearch.com, revoohc@gmail.com
  Subject: Re: All numeric database names?
  In-Reply-To: <4783E41F.6040608@pinpointresearch.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