| From: | "Dan" <ml(at)mutox(dot)org> | 
|---|---|
| To: | pgsql-general(at)postgresql(dot)org | 
| Subject: | Re: Create user or role from inside a function? | 
| Date: | 2006-09-01 11:53:46 | 
| Message-ID: | 56561.203.143.226.132.1157111626.squirrel@secure.x32i.net | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | 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:
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Boguk Maxim | 2006-09-01 12:02:46 | Some strange plans choosed by postgres for one query: | 
| Previous Message | Dan | 2006-09-01 11:52:12 | Re: Create user or role from inside a function? |