The current error message for an invalid format conversion type is extremely confusing except in the simplest of uses: select format( '% moo'); ERROR: unrecognized conversion type specifier " " Obviously in that example you can figure out what's going on, but frequently format() is used in a complex context where it's not at all obvious that format is the problem. Even worse, "conversion" makes it sound like a localization issue. Attached patch clarifies that %-related error messages with hints as well as (IMHO) improving the clarity of the message: select format( '% moo'); ERROR: unrecognized format() type specifier " " HINT: For a single "%" use "%%" I also made the use of "format()" consistent in all the other error messages. -- Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX Experts in Analytics, Data Architecture and PostgreSQL Data in Trouble? Get it in Treble! http://BlueTreble.com
On 1/2/16 5:57 PM, Jim Nasby wrote: > Attached patch clarifies that %-related error messages with hints as > well as (IMHO) improving the clarity of the message: Sorry, forgot to update regression tests. New patch attached. -- Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX Experts in Analytics, Data Architecture and PostgreSQL Data in Trouble? Get it in Treble! http://BlueTreble.com
Thank you, committed Jim Nasby wrote: > On 1/2/16 5:57 PM, Jim Nasby wrote: >> Attached patch clarifies that %-related error messages with hints as >> well as (IMHO) improving the clarity of the message: > > Sorry, forgot to update regression tests. New patch attached. > > > -- Teodor Sigaev E-mail: teodor@sigaev.ru WWW: http://www.sigaev.ru/
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера