From: | "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
---|---|
To: | "Ow Mun Heng *EXTERN*" <Ow(dot)Mun(dot)Heng(at)wdc(dot)com> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: replacing single quotes |
Date: | 2007-10-10 08:46:24 |
Message-ID: | D960CB61B694CF459DCFB4B0128514C25685CB@exadv11.host.magwien.gv.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Ow Mun Heng wrote:
>>> Input is of form
>>>
>>> 'ppp','aaa','bbb'
>>>
>>> I want it to be stripped of quotes to become
>>>
>>> ppp,aaa,bbb
>>
>> I'm a little confused that you think that you will have to
>> escape single quotes in the input.
>> What is your use case? Normally the input is in some variable
>> in some programming language.
>> Escaping single quotes is only for string literals.
>
> The input is for an SRF which accepts an array..
>
> eg:
> select * from foo(date1,date2,'{aaa,bbb,ccc}')
>
> where the function goes..
> create function foo(timestamp, timestamp, foo_list text[])
> returns setof
> ...
Yes, but where does '{aaa,bbb,ccc}' come from?
I assume that this string literal is only an example
that you use to describe how the function is called.
In reality you will have varying values for the
foo_list function argument. So you'll store it in some
kind of variable, right?
In which programming language do you write?
Yours,
Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | Jasbinder Singh Bali | 2007-10-10 09:05:32 | Re: SLEEP in posgresql |
Previous Message | Andrew Kelly | 2007-10-10 08:44:00 | Re: DB upgrade |