Project

General

Profile

« Previous | Next » 

Revision 12476

bugfix: schemas/util.sql: undid r12472 because the command needed to limit the effects of any `SET LOCAL search_path` to the current function will unfortunately also clear any existing search_path, which may be needed for the eval query to execute

View differences:

trunk/schemas/util.sql
1298 1298

  
1299 1299
CREATE FUNCTION eval2col_pair(sql text, col_type_null anyelement, OUT left_ anyelement, OUT right_ anyelement) RETURNS SETOF record
1300 1300
    LANGUAGE plpgsql
1301
    SET search_path TO pg_temp
1302 1301
    AS $$
1303
/* function option search_path is needed to limit the effects of any
1304
`SET LOCAL search_path` to the current function */
1305 1302
BEGIN
1306 1303
	PERFORM util.debug_print_sql(sql);
1307 1304
	RETURN QUERY EXECUTE sql;
......
1324 1321

  
1325 1322
CREATE FUNCTION eval2records(sql text) RETURNS SETOF record
1326 1323
    LANGUAGE plpgsql
1327
    SET search_path TO pg_temp
1328 1324
    AS $$
1329
/* function option search_path is needed to limit the effects of any
1330
`SET LOCAL search_path` to the current function */
1331 1325
BEGIN
1332 1326
	PERFORM util.debug_print_sql(sql);
1333 1327
	RETURN QUERY EXECUTE sql;
......
1341 1335

  
1342 1336
CREATE FUNCTION eval2set(sql text, ret_type_null anyelement DEFAULT NULL::text, verbose_ boolean DEFAULT true) RETURNS SETOF anyelement
1343 1337
    LANGUAGE plpgsql
1344
    SET search_path TO pg_temp
1345 1338
    AS $$
1346
/* function option search_path is needed to limit the effects of any
1347
`SET LOCAL search_path` to the current function */
1348 1339
BEGIN
1349 1340
	IF verbose_ THEN PERFORM util.debug_print_sql(sql); END IF;
1350 1341
	RETURN QUERY EXECUTE sql;
......
1358 1349

  
1359 1350
CREATE FUNCTION eval2val(sql text, ret_type_null anyelement DEFAULT NULL::text) RETURNS anyelement
1360 1351
    LANGUAGE plpgsql
1361
    SET search_path TO pg_temp
1362 1352
    AS $$
1363
/* function option search_path is needed to limit the effects of any
1364
`SET LOCAL search_path` to the current function */
1365 1353
DECLARE
1366 1354
	ret_val ret_type_null%TYPE;
1367 1355
BEGIN

Also available in: Unified diff