9.3 prepare plans - possible incompatibility - Mailing list pgsql-hackers

From Pavel Stehule
Subject 9.3 prepare plans - possible incompatibility
Date
Msg-id CAFj8pRD32a0D1nuhtqM29UOP5wMEmD34ZcNYFm49qygJ5xTyGA@mail.gmail.com
Whole thread Raw
List pgsql-hackers
Hello

I am not sure so replanning prepared plans due change of search_path is expected in all use cases. Minimally it should be mentioned as possible incompatibility.

Use case - move record from schema A to schema B with prepared statements

SET search_path = 'A';
PREPARE x(int) AS DELETE FROM tab WHERE id = $1 RETURNING *;

SET search_path = 'B';
PREPARE y(int, int) AS INSERT INTO tab VALUES($1, $2);

EXECUTE x;
EXECUTE y(10,20);

This use case will not work in 9.3.

Regards

Pavel

pgsql-hackers by date:

Previous
From: Marko Kreen
Date:
Subject: Re: erroneous restore into pg_catalog schema
Next
From: Fabien COELHO
Date:
Subject: Re: Add more regression tests for dbcommands