PG_DIAG_SEVERITY and a possible bug in pq_parse_errornotice()

Поиск
Список
Период
Сортировка
От Jakob Egger
Тема PG_DIAG_SEVERITY and a possible bug in pq_parse_errornotice()
Дата
Msg-id A88E0006-13CB-49C6-95CC-1A77D717213C@eggerapps.at
обсуждение исходный текст
Ответы Re: PG_DIAG_SEVERITY and a possible bug in pq_parse_errornotice()  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

My PostgreSQL client checks the PG_DIAG_SEVERITY error field to determine the error level.

However, I have now learned that this field is localized. This means that a server configured with --enable-nls might
forexample return the string ERREUR instead of ERROR. 

So if I want to determine the error level, do I need to compare against all localised variations in my app? Or is there
anotherway? 

I browsed through the PostgreSQL source and discovered that pq_parse_errornotice() (in src/backend/libpq/pqmq.c) uses
thesame naive strcmp() approach to determine error level. This means that it will fail when the server is compiled with
--enable-nls.I am not sure what the impact of this is, since I couldn't really figure out where that function is used. 

Best regards,
Jakob


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: increasing the default WAL segment size
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: increasing the default WAL segment size