| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | "Martijn van Dijk" <martijn(at)hardworks(dot)nl> |
| Cc: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: Escaping \ |
| Date: | 2001-03-29 16:05:47 |
| Message-ID: | 22461.985881947@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
"Martijn van Dijk" <martijn(at)hardworks(dot)nl> writes:
> But when I try this in a Function:
> CREATE FUNCTION sp_tmp() RETURNS varchar(10)
> AS '
> SELECT ''\\\' AS RESULT'
> LANGUAGE 'sql';
> I get the following Parse-erros:
You need an extra level of quoting because the function body is itself
a string literal. You might find the quoting discussion in
http://www.postgresql.org/devel-corner/docs/postgres/plpgsql-porting.html
helpful.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2001-03-29 16:43:43 | Re: [SQL] inconsistent functionality with LIKE operator |
| Previous Message | clayton cottingham | 2001-03-29 15:54:25 | Re: Calling Java from psql (was Re: requesting help) |