Re: Pl/Pgsql function troubles: FOLLOW UP - Mailing list pgsql-novice

From Oliver Elphick
Subject Re: Pl/Pgsql function troubles: FOLLOW UP
Date
Msg-id 1018996650.27903.66.camel@linda
Whole thread Raw
In response to Pl/Pgsql function troubles: FOLLOW UP  (Jeff Post <postjeff@uwm.edu>)
List pgsql-novice
On Tue, 2002-04-16 at 22:58, Jeff Post wrote:
> here is Code that I got working but I still have some problems with:
> (I am asking for help, so if you wish to skip to my question read the last
> sentance)
>
> CREATE or replace FUNCTION list_of_membership(integer,CHAR) RETURNS TEXT AS '
...
>    FOR membership_rec IN EXECUTE sqlstr1 || $1 || sqlstr2 ||  $2 || sqlstr3
                                                                ^^
quote_literal($2)

Think what the command would look like if you ran it directly.  A
literal string must be quoted.

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C

     "But seek ye first the kingdom of God, and his
      righteousness; and all these things shall be added
      unto you."     Matthew 6:33

Attachment

pgsql-novice by date:

Previous
From: Jeff Post
Date:
Subject: Pl/Pgsql function troubles: FOLLOW UP
Next
From: "Josh Berkus"
Date:
Subject: Re: cannot restore db