Re: escape string syntax and pg_dumpall

From: Andrew - Supernews <andrew+nonews(at)supernews(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: escape string syntax and pg_dumpall
Date: 2005-07-18 18:13:16
Message-ID: slrnddns9s.2k2r.andrew+nonews@trinity.supernews.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2005-07-18, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> That comes from v1.62 of pg_dumpall.c :
>
>> res = executeQuery(conn, "SELECT spcname, "
>> "pg_catalog.pg_get_userbyid(spcowner) AS spcowner, "
>> "spclocation, spcacl "
>> "FROM pg_catalog.pg_tablespace "
>> "WHERE spcname NOT LIKE E'pg\\_%'");
>
> This query needs to be version-dependent, Bruce ...

It's not even correct as it stands - if you want to match a literal _
using LIKE then you would need E'pg\\\\_%' there.

Would NOT LIKE 'pg!_%' ESCAPE '!' be better?

--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-07-18 19:01:31 Re: escape string syntax and pg_dumpall
Previous Message Tom Lane 2005-07-18 17:25:28 Re: escape string syntax and pg_dumpall