Re: db encoding - Mailing list pgsql-hackers

From Oliver Elphick
Subject Re: db encoding
Date
Msg-id 1065474313.4453.195.camel@linda.lfix.co.uk
Whole thread Raw
In response to Re: db encoding  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, 2003-10-06 at 21:31, Tom Lane wrote:
> Oliver Elphick <olly@lfix.co.uk> writes:
> > I currently use pg_encoding in Debian's automatic upgrade script to
> > extract the existing default encoding from pg_database, thus:
> > $ psql  -q -t -d template1 -c "select encoding from pg_database where
> > datname = 'template1'"
> >         0
> > and then I use it to translate that number into an encoding name that
> > can be fed to initdb.
> 
> But you can do that with pg_encoding_to_char:

So I see -- now, but I had missed its very existence, I'm afraid.

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
========================================   "Blessed is the man that walketh not in the counsel of      the ungodly, nor
standethin the way of sinners, nor      sitteth in the seat of the scornful. But his delight      is in the law of the
LORD;and in his law doth he      meditate day and night."         Psalms 1:1,2 
 



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: db encoding
Next
From: Gaetano Mendola
Date:
Subject: Re: Open 7.4 items