| От | Tom Lane |
|---|---|
| Тема | Re: Quirks in Sorting Pg_description |
| Дата | |
| Msg-id | 24383.1267629229@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Quirks in Sorting Pg_description (P <user2037@live.com>) |
| Список | pgsql-admin |
P <user2037@live.com> writes:
> The following query works from Psql's prompt but not from Psql's "-c"
> command or from PHP's PDO interface.
> SELECT description FROM pg_catalog.pg_description WHERE description
> SIMILAR TO '\d+' ORDER BY description::integer DESC LIMIT 1;
1. I think you'll find that "SIMILAR TO '\d+'" doesn't do what you
think; or at least, if it does, that's an implementation artifact
not to be relied on. Use a POSIX regex operator instead.
2. Perhaps the context sensitivity of the behavior is explained by the
shell or PHP eating the backslash? It certainly seems like you're at
risk for different numbers of levels of backslash processing in these
cases.
regards, tom lane
В списке pgsql-admin по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера