Re: Inserting string with a " into an array using {} syntax ... possible?

From: Bill Moran <wmoran(at)potentialtech(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Inserting string with a " into an array using {} syntax ... possible?
Date: 2009-03-13 14:21:56
Message-ID: 20090313102156.82c08d7f.wmoran@potentialtech.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In response to Pavel Stehule <pavel(dot)stehule(at)gmail(dot)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/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Grzegorz Jaśkiewicz 2009-03-13 14:41:49 Re: Transactions in user defined function
Previous Message Andreas Wenk 2009-03-13 13:54:06 Re: Fwd: Question about Privileges