Re: db encoding

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL hackers list <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: db encoding
Date: 2003-10-06 21:05:13
Message-ID: 1065474313.4453.195.camel@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-hackers-win32

On Mon, 2003-10-06 at 21:31, Tom Lane wrote:
> Oliver Elphick <olly(at)lfix(dot)co(dot)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(dot)Elphick(at)lfix(dot)co(dot)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 standeth in 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gaetano Mendola 2003-10-06 21:10:08 Re: psql italian translation
Previous Message Gaetano Mendola 2003-10-06 21:03:57 Re: psql italian translation

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Andrew Dunstan 2003-10-06 22:32:02 new initdb.c available
Previous Message Tom Lane 2003-10-06 20:31:24 Re: db encoding