Escape double-quotes in text[]? - Mailing list pgsql-general

From Raymond O'Donnell
Subject Escape double-quotes in text[]?
Date
Msg-id 5360155F.5050603@iol.ie
Whole thread Raw
Responses Re: Escape double-quotes in text[]?  (Raymond O'Donnell <rod@iol.ie>)
Re: Escape double-quotes in text[]?  (David G Johnston <david.g.johnston@gmail.com>)
Re: Escape double-quotes in text[]?  (David G Johnston <david.g.johnston@gmail.com>)
List pgsql-general
Hi all,

Probably a silly question, but I'm having trouble figuring out the
answer... if I'm constructing an string representation of a value to go
into a text[] column, and one of the text literals includes
double-quotes, do I need to escape the literal?

For example, can I insert something like this into a text[] column
directly? -

  '{"abc", "de"f"}'

Or would I need to do this? -

  E'{"abc", "de"f"}'

....or something different again? I'm doing this from PHP via the Zend
framework (v.1) if it makes any difference.

Thanks,

Ray.


--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie


pgsql-general by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Planned downtime @ Rackspace - 2014-04-29 2100-2200 UTC
Next
From: Raymond O'Donnell
Date:
Subject: Re: Escape double-quotes in text[]?