9.3 prepare plans - possible incompatibility

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: 9.3 prepare plans - possible incompatibility
Date: 2013-05-13 19:05:00
Message-ID: CAFj8pRD32a0D1nuhtqM29UOP5wMEmD34ZcNYFm49qygJ5xTyGA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2013-05-13 19:11:56 Re: Add more regression tests for dbcommands
Previous Message Marko Kreen 2013-05-13 19:00:04 Re: erroneous restore into pg_catalog schema