Re: Create user or role from inside a function?

Поиск
Список
Период
Сортировка
От Dan
Тема Re: Create user or role from inside a function?
Дата
Msg-id 56561.203.143.226.132.1157111626.squirrel@secure.x32i.net
обсуждение исходный текст
Ответ на Re: Create user or role from inside a function?  (Roman Neuhauser <neuhauser@sigpipe.cz>)
Список pgsql-general
(Sending to the list as I accidently only replied to Roman with my earlier
reply)

Thanks for your assistance. This was a case of user error. To me the
examples I looked at used the double quote (") but on further inspection
they do indeed use double single quotes (').

The quote_literal function was also handy for this.

Thanks again!

Regards,

Dan


>     Double quotes can be used only for identifiers (table, column
>     names, etc), you want to use single quotes for strings. Now, since
>     you already are in a string (the function body), you need to escape
>     the single quotes inside. In SQL this is done by doubling the quote
>     character, IOW, by putting another single quote just before it:

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

Предыдущее
От: "Dan"
Дата:
Сообщение: Re: Create user or role from inside a function?
Следующее
От: Marc Evans
Дата:
Сообщение: Re: postgres array quoting