Re: db encoding

Поиск
Список
Период
Сортировка
От Oliver Elphick
Тема Re: db encoding
Дата
Msg-id 1065469347.4455.171.camel@linda.lfix.co.uk
обсуждение исходный текст
Ответ на Re: db encoding  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: db encoding  (Andrew Dunstan <andrew@dunslane.net>)
Re: db encoding  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, 2003-10-06 at 19:30, Peter Eisentraut wrote:

> About pg_encoding.  There is currently no way to tell whether an encoding
> exists.  Normally you would put this kind of thing into a system table,
> but doing that is a bit tricky with the encodings.  I would like to see
> pg_encoding go, so let's hear what information people need and give them a
> direct way to access it.

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.

However, on looking at this, I can see that I don't need it, since I can
just as well do

$ psql -l | grep template1 | awk '{print $5}'
SQL_ASCII

so as to achieve the same result with only a single command.

Therefore, you don't need to keep pg_encoding for my (the Debian
package's) sake.

-- 
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 по дате отправления:

Предыдущее
От: markw@osdl.org
Дата:
Сообщение: Re: More Prelimiary DBT-2 Test Results with PostgreSQL
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: db encoding