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