On Tue, Nov 8, 2022 at 6:27 PM David Gauthier wrote:
>
>
> dvdb=# insert into testarr (arr) values ('{"hijk\"lmnop"}');
>
This is (one of) the correct ways to formulate what you want.
> INSERT 0 1
> dvdb=# select * from testarr;
>arr
> -
> {abc
psql (11.5, server 11.3) on linux
Trying to insert a string containing a double-quote into a varchar arr.
Here's my attempt
dvdb=# create table testarr (arr varchar[]);
CREATE TABLE
dvdb=# insert into testarr (arr) values ('{"abcdefg"}');
INSERT 0 1
dvdb=# select * from testarr