Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f4ec2fa

Browse files
committed
Modify information_schema._pg_keysequal() to avoid search path risk when
contrib/intarray is loaded. Per bug #5417 from Kenaniah Cerny. Not forcing initdb since backend doesn't directly depend on this, and few people have run into it.
1 parent c80a85e commit f4ec2fa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/catalog/information_schema.sql

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Copyright (c) 2003-2010, PostgreSQL Global Development Group
66
*
7-
* $PostgreSQL: pgsql/src/backend/catalog/information_schema.sql,v 1.65 2010/01/28 23:21:11 petere Exp $
7+
* $PostgreSQL: pgsql/src/backend/catalog/information_schema.sql,v 1.66 2010/04/28 21:18:07 tgl Exp $
88
*/
99

1010
/*
@@ -24,7 +24,7 @@
2424

2525
CREATE SCHEMA information_schema;
2626
GRANT USAGE ON SCHEMA information_schema TO PUBLIC;
27-
SET search_path TO information_schema, public;
27+
SET search_path TO information_schema;
2828

2929

3030
/*
@@ -42,7 +42,7 @@ CREATE FUNCTION _pg_expandarray(IN anyarray, OUT x anyelement, OUT n int)
4242

4343
CREATE FUNCTION _pg_keysequal(smallint[], smallint[]) RETURNS boolean
4444
LANGUAGE sql IMMUTABLE -- intentionally not STRICT, to allow inlining
45-
AS 'select $1 <@ $2 and $2 <@ $1';
45+
AS 'select $1 operator(pg_catalog.<@) $2 and $2 operator(pg_catalog.<@) $1';
4646

4747
/* Given an index's OID and an underlying-table column number, return the
4848
* column's position in the index (NULL if not there) */

0 commit comments

Comments
 (0)