Re: Underscores in column names

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Underscores in column names
Дата
Msg-id 958.1047056899@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Underscores in column names  (Mark Mitchell <mark@lapcrew.com>)
Список pgsql-sql
Mark Mitchell <mark@lapcrew.com> writes:
> SELECT * FROM "NATAB" WHERE
> "NATAB"."NA_LAST_NAME" LIKE 'MITCHELL%' AND
> SUBSTRING("NATAB"."NA_NAME",0,"NATAB"."NA_COLON") LIKE 'MARK%'

> Produces the error : "ESCAPE string must be empty or one character"

This is a datatype issue, not a naming issue.  If the second and third
arguments to substring() aren't integers (and no, I don't mean numeric,
nor float, I mean int4), the parser is likely to think you are asking
for the three-text-parameter variant of substring().  Which is
SQL99-style regexps with an alternate escape string.
        regards, tom lane


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

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: Hex Integer Input
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Hex Integer Input