[NOVICE] Regression test : pg_conversion validation

Поиск
Список
Период
Сортировка
От neha khatri
Тема [NOVICE] Regression test : pg_conversion validation
Дата
Msg-id CAFO0U+8tGef__nVrhKSQo5sOae-4s6uc84ChoVwLPH=fdffF4A@mail.gmail.com
обсуждение исходный текст
Ответы Re: [NOVICE] Regression test : pg_conversion validation  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
In PostgreSQL9.6, the test opr_sanity from server regression suite has added following validations for the System Catalog pg_conversion.
SELECT p1.oid, p1.conname
FROM pg_conversion as p1
WHERE condefault AND
convert('ABC'::bytea, pg_encoding_to_char(conforencoding),
pg_encoding_to_char(contoencoding)) != 'ABC';
It looks like this validation might not reflect the correct behaviour for a well defined conproc for certain encodings. 
e.g. Consider LATIN1 as src_encoding and EBCDIC as dst_encoding in the above query. Now the convert() result for this should be:

select convert('ABC'::bytea,'LATIN1','EBCDIC');
convert  
----------
\xc1c2c3

The resultant hex value above(which is the actual EBCDIC code for 'ABC') is not same as ASCII hex value for 'ABC'. Hence the validation query from opr_sanity would  show this conproc in the output indicating that the conproc is not well defined. This does not seem correct.
 
Please let me know if this understanding is correct. If it is, then the validation test should indicate that the specific conversion is a valid conversion.

Regards,
Neha

В списке pgsql-novice по дате отправления:

Предыдущее
От: Rounak Jain
Дата:
Сообщение: [NOVICE] are separate join tables necessary/important like in Filemaker
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [NOVICE] Regression test : pg_conversion validation