Re: [BUGS] Nasty tsvector can make dumps unrestorable

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Stuart Bishop <stuart(at)stuartbishop(dot)net>, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [BUGS] Nasty tsvector can make dumps unrestorable
Date: 2007-11-10 03:53:18
Message-ID: 47352B2E.7020507@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Bruce Momjian wrote:
> However, I am still unclear if the dump code is correct because I don't
> see the backslash preserved in \\'' cases, just \\\\ cases:
>
> test=> CREATE TABLE Foo(bar tsvector);
> CREATE
> test=> INSERT INTO Foo(bar) VALUES (E'\\''x');
> INSERT 0 1
> test=> select * from foo;
> bar
> -------
> '''x'
> (1 row)
>
> and pg_dump outputs:
>
> COPY foo (bar) FROM stdin;
> '''x'
> \.
>
>
> While the COPY will load into the table, this doesn't:
>
> test=> INSERT INTO Foo(bar) VALUES (E'''''x');
> ERROR: syntax error in tsvector: "''x"
>
> I am confused.
>
>

These two are not equivalent. What happens if you try this?

INSERT INTO Foo(bar) VALUES (E'''''''x''');

cheers

andrew

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2007-11-10 03:55:15 Re: [BUGS] Nasty tsvector can make dumps unrestorable
Previous Message Bruce Momjian 2007-11-10 03:19:44 Re: [BUGS] Nasty tsvector can make dumps unrestorable

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2007-11-10 03:55:15 Re: [BUGS] Nasty tsvector can make dumps unrestorable
Previous Message Bruce Momjian 2007-11-10 03:19:44 Re: [BUGS] Nasty tsvector can make dumps unrestorable