Re: [GENERAL] Minor systax error but not able to resolve it...

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [GENERAL] Minor systax error but not able to resolve it...
Дата
Msg-id 22269.1266940435@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Minor systax error but not able to resolve it...  (dipti shah <shahdipti1980@gmail.com>)
Ответы Re: [GENERAL] Minor systax error but not able to resolve it...  (dipti shah <shahdipti1980@gmail.com>)
Список pgsql-novice
Richard Huxton <dev@archonet.com> writes:
> You're interpolating $cmd here but not quoting it, so you end up with:
> ... RETURNS void AS CREATE TABLE test-table...
> whereas you want:
> ... RETURNS void AS 'CREATE TABLE test-table...'...

> Probably best to use dollar-quoting: $TMP$ or similar, but don't forget
> to escapt the $ or perl will think it's a variable.

Dollar-quoting is really dangerous when you're trying to quote
nonconstant text.  I'd suggest passing the string through
quote_literal() instead.

            regards, tom lane

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

Предыдущее
От: Susan M Farley
Дата:
Сообщение: Function Error
Следующее
От: Michael Wood
Дата:
Сообщение: Re: Function Error