Search Postgresql Archives

Re: Create user or role from inside a function?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(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:


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux