Re: BUG #4843: non standard use string literal warning in RAISE WARNING
В списке pgsql-bugs по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: BUG #4843: non standard use string literal warning in RAISE WARNING |
| Дата | |
| Msg-id | 12158.1244469455@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | BUG #4843: non standard use string literal warning in RAISE WARNING ("Regina" <lr@pcorp.us>) |
| Список | pgsql-bugs |
"Regina" <lr@pcorp.us> writes:
> I'm not sure if this is a bug or expected behavior. But in a new PostGIS
> function we are writing, we are getting a
> WARNING: nonstandard use of \' in a string literal HINT: Use to write
> quotes in strings, or use the escape string syntax (E'...').
> With sections of the code that look like
> RAISE WARNING 'Not inserting \'%\' in \'%.%\' into geometry_columns: could
> not determine ndims', quote_ident(gcs.attname), quote_ident(gcs.nspname),
> quote_ident(gcs.relname);
> The same function on 8.3.7 does not do this.
This is an intended change: RAISE format strings are now processed the
same as any other string literal. Personally I'd suggest using '' here
rather than \' --- more standard, more future-proof, etc.
(Hmm, there seems to be nothing about it in the release notes ... not
sure how we overlooked that.)
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера