Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fdd8446

Browse files
committed
Avoid need for E'' construct by using regexp instead of LIKE. More
readable, and more like the other places in this file.
1 parent adeede1 commit fdd8446

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/psql/describe.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.121 2005/07/18 17:40:14 tgl Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.122 2005/07/18 19:09:09 tgl Exp $
77
*/
88
#include "postgres_fe.h"
99
#include "describe.h"
@@ -1766,7 +1766,7 @@ listSchemas(const char *pattern, bool verbose)
17661766
appendPQExpBuffer(&buf,
17671767
"\nFROM pg_catalog.pg_namespace n LEFT JOIN pg_catalog.pg_user u\n"
17681768
" ON n.nspowner=u.usesysid\n"
1769-
"WHERE (n.nspname NOT LIKE E'pg\\\\_temp\\\\_%%' OR\n"
1769+
"WHERE (n.nspname !~ '^pg_temp_' OR\n"
17701770
" n.nspname = (pg_catalog.current_schemas(true))[1])\n"); /* temp schema is first */
17711771

17721772
processNamePattern(&buf, pattern, true, false,

0 commit comments

Comments
 (0)