Skip site navigation (1) Skip section navigation (2)

arrays of varchar and "

From: Tim Kane <timk(at)hotgames(dot)com>
To: PSQL Interfaces <pgsql-interfaces(at)postgreSQL(dot)org>
Subject: arrays of varchar and "
Date: 2000-02-24 23:54:18
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfacespgsql-sql
I don't recall seeing a response to this, so I'm posting it again.
Sorry if you've seen this twice!
(Assuming my original post made it here anyway).

I have.
    create table my_table (
        varchar    stuff[];            # An array of varchar

I want to insert a number of array elements here...

    insert into my_table values ('{"value 1", "value 2", "value 3"}');


What do I do however, when I want to insert an array element that
contains a " character?
It seems I am unable to escape it it like \" as I normally would for a '

Instead, the parser seems to chop out a portion of the query string...

Known bug?
Is there a workaround?

Thanks Heaps!!



pgsql-interfaces by date

Next:From: Tom LaneDate: 2000-02-25 01:03:37
Subject: Re: [INTERFACES] arrays of varchar and "
Previous:From: Ed LoehrDate: 2000-02-24 23:50:21
Subject: Re: [INTERFACES] selectecting not null varchars.

pgsql-sql by date

Next:From: Tom LaneDate: 2000-02-24 23:57:50
Subject: Re: [SQL] how to create index on timestamp field in pre v7 database
Previous:From: M.MazurekDate: 2000-02-24 22:38:48
Subject: date_part, too many results?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group