Re: Inserting string with a " into an array using {} syntax ... possible? - Mailing list pgsql-general

From Bill Moran
Subject Re: Inserting string with a " into an array using {} syntax ... possible?
Date
Msg-id 20090313102156.82c08d7f.wmoran@potentialtech.com
Whole thread Raw
In response to Re: Inserting string with a " into an array using {} syntax ... possible?  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-general
In response to Pavel Stehule <pavel.stehule@gmail.com>:

> Hello
>
> try
> postgres=# SELECT ARRAY['text "for you" some'];
>            array
> ---------------------------
>  {"text \"for you\" some"}
> (1 row)

Thanks, and I'm aware of that, but it doesn't answer the original
question.  The code I'm writing is back-end code that other developers
will use to submit queries.

I don't have the luxury of changing their queries from {} syntax to
[] syntax at runtime.  However, if this is something that can't be
done with {}, I can catch it during data validation and throw a useful
error.

--
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/

pgsql-general by date:

Previous
From: emsa@devdep.com
Date:
Subject: postmaster hangs on delete from
Next
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: Transactions in user defined function