This is a discussion on escaping string in a function within the pgsql Novice forums, part of the PostgreSQL category; --> Hi, I'm trying to write a function that would the results of select 'foo' .. How do I escape ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, I'm trying to write a function that would the results of select 'foo' .. How do I escape strings within a create function block? Thanks, Shuying ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org |
| |||
| I think I should also add that I'm using PostgreSQL 7.3 On 3/2/06, Shuying Wang <wang.shuying.lists@gmail.com> wrote: > Hi, > > I'm trying to write a function that would the results of select 'foo' > . How do I > escape strings within a create function block? > > Thanks, > Shuying > ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly |
| ||||
| On Thu, Mar 02, 2006 at 02:24:09PM +1100, Shuying Wang wrote: > I'm trying to write a function that would the results of select 'foo'. > How do I escape strings within a create function block? It's not clear what you're trying to do -- could you explain a little more? Does the following example help? CREATE FUNCTION func() RETURNS text AS ' SELECT ''foo''::text ' LANGUAGE sql IMMUTABLE; -- Michael Fuhr ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org |
| Thread Tools | |
| Display Modes | |
|
|