Re: [HACKERS] pg_conversion seems rather strangely defined

2016-01-11 Thread Tatsuo Ishii
>> I used to had a customer who needs to have different client and >> database encoding than the default. That is, a slightly different >> mapping between Shift-JIS and other database encoding. Due to >> unfortunate historical reasons, there are several Shift-JIS variants >> (in addition to the s

Re: [HACKERS] pg_conversion seems rather strangely defined

2016-01-07 Thread Tom Lane
Tatsuo Ishii writes: >> It would only be important to be able to do it like that if different >> users of the same database had conflicting ideas about what was the >> correct conversion between client and database encodings. I submit >> that that's somewhere around epsilon probability, consideri

Re: [HACKERS] pg_conversion seems rather strangely defined

2016-01-07 Thread Tatsuo Ishii
> It would only be important to be able to do it like that if different > users of the same database had conflicting ideas about what was the > correct conversion between client and database encodings. I submit > that that's somewhere around epsilon probability, considering we have > not even hear

Re: [HACKERS] pg_conversion seems rather strangely defined

2016-01-07 Thread Tom Lane
Noah Misch writes: > On Wed, Jan 06, 2016 at 11:56:14PM -0500, Tom Lane wrote: >> Moreover, we have precedent both for this approach being a bad idea >> and for us changing it without many complaints. We used to have >> search-path-dependent lookup of default index operator classes. >> We found o

Re: [HACKERS] pg_conversion seems rather strangely defined

2016-01-07 Thread Noah Misch
On Wed, Jan 06, 2016 at 11:56:14PM -0500, Tom Lane wrote: > Noah Misch writes: > > On Tue, Jan 05, 2016 at 01:46:51PM -0500, Tom Lane wrote: > >> I do not see a lot of point in the namespacing of encoding conversions > >> either. Does anyone really need or use search-path-dependent lookup of > >>

Re: [HACKERS] pg_conversion seems rather strangely defined

2016-01-06 Thread Tom Lane
Noah Misch writes: > On Tue, Jan 05, 2016 at 01:46:51PM -0500, Tom Lane wrote: >> I do not see a lot of point in the namespacing of encoding conversions >> either. Does anyone really need or use search-path-dependent lookup of >> conversions? > I have not issued CREATE CONVERSION except to exper

Re: [HACKERS] pg_conversion seems rather strangely defined

2016-01-06 Thread Noah Misch
On Tue, Jan 05, 2016 at 01:46:51PM -0500, Tom Lane wrote: > I do not see a lot of point in the namespacing of encoding conversions > either. Does anyone really need or use search-path-dependent lookup of > conversions? I have not issued CREATE CONVERSION except to experiment, and I have never wor

Re: [HACKERS] pg_conversion seems rather strangely defined

2016-01-05 Thread Tom Lane
I wrote: > I still think however that search-path-based lookup of default encoding > conversions is a Bad Idea, and that we only ought to allow one default > conversion to exist for any pair of encodings. > I realized that we could implement that without too much trouble by > redefining pg_convers

Re: [HACKERS] pg_conversion seems rather strangely defined

2016-01-05 Thread Tom Lane
I wrote: > What is the point of pg_conversion.condefault (the flag that says whether > a conversion is "default")? AFAICS, there is absolutely no way to invoke > a conversion that is not default, which means we might as well eliminate > the concept. > I do not see a lot of point in the namespacin

[HACKERS] pg_conversion seems rather strangely defined

2016-01-05 Thread Tom Lane
What is the point of pg_conversion.condefault (the flag that says whether a conversion is "default")? AFAICS, there is absolutely no way to invoke a conversion that is not default, which means we might as well eliminate the concept. I do not see a lot of point in the namespacing of encoding conve

Re: [HACKERS] pg_conversion

2002-12-07 Thread Tatsuo Ishii
> What do the columns conforencoding and contoencoding refer to in > pg_conversion? > > How would I convert those numbers to a string encoding name, just using SQL? > > Chris Use pg_encoding_to_char(). -- Tatsuo Ishii ---(end of broadcast)--- TIP

[HACKERS] pg_conversion

2002-12-06 Thread Christopher Kings-Lynne
Hi, What do the columns conforencoding and contoencoding refer to in pg_conversion? How would I convert those numbers to a string encoding name, just using SQL? Chris ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www