public inbox for pgsql-performance@postgresql.org  
help / color / mirror / Atom feed
From: Erik Rijkers <er@xs4all.nl>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Artur Zakirov <a.zakirov@postgrespro.ru>
Cc: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Gilles Darold <gilles.darold@dalibo.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: [HACKERS] proposal: schema variables
Date: Mon, 31 Dec 2018 16:40:24 +0100
Message-ID: <df879d16a6cf3f7b4bb6f56f036ea2fa@xs4all.nl> (raw)
In-Reply-To: <CAFj8pRAOB0UMA_FJy6dOHLSDEZDN6B9zV33LQFebSEgHQKBY4A@mail.gmail.com>
References: <CAFj8pRCRUpNjX9Fb49SaADbRnCE69ndkOvtoeKxwvxetfJ8=kA@mail.gmail.com>
	<alpine.DEB.2.21.1808220831550.10677@lancre>
	<CAFj8pRCyvx37Fnw6yHdscGbbGo_Ak3WdeKiZ6arFW8JTA099YA@mail.gmail.com>
	<alpine.DEB.2.21.1808230927090.31897@lancre>
	<CAFj8pRAcFv09qOcbr09c2AbwZ9DGw5Hs6rPcYoo7r9OLdWWB2A@mail.gmail.com>
	<CAEZATCVy77hhgTZ1Yrvbp6GbsUuWY0Bw8CLbv_Jr2mAF_bOkBA@mail.gmail.com>
	<CAFj8pRDREykg0hnMBkryBmSTtqEs9QUKUp_447_F5P1j8bkH1w@mail.gmail.com>
	<CAFj8pRBkPswn0JA8U3vFOdBGqcBu0ZM7jC7JcDdCS1EbZfzb2A@mail.gmail.com>
	<CAFj8pRAi2Xd93ae-SsnMOC5W4hWenmkftTnCrHgdcPpvbOs1bg@mail.gmail.com>
	<CAFj8pRCZuq=0MRsYrNzBqxPx5fqmKFN3i-BsPo8j=yW6N_=WDA@mail.gmail.com>
	<20180919112305.GA18604@zakirov.localdomain>
	<CAFj8pRCO+S9JVi+8L8MT7pcpz2+-orj5ju8k=e+PqZBhdYPhXg@mail.gmail.com>
	<CAFj8pRCB7ZDgTWD2BLaiATFEg_VpVgqTGkJwwd4t1hMTZ=4W=Q@mail.gmail.com>
	<CAFj8pRAc_=XEpS7csp0bozopsCwLc3z-C+_46RUYdPB7kxbNAw@mail.gmail.com>
	<CAFj8pRBSTLxQXcGXruo3zRDBdk378gA+nsi9FM9SxhV1qa0iCw@mail.gmail.com>
	<CAFj8pRAR03rRfAsbYpsP-NDq3npWZdiQoX9vkrX2HSuA9COuUg@mail.gmail.com>
	<CAFj8pRBrc6AULAT6e4cAbd86Y4qjTP9app=TsU15Hq=_2NNYfA@mail.gmail.com>
	<CAFj8pRAOB0UMA_FJy6dOHLSDEZDN6B9zV33LQFebSEgHQKBY4A@mail.gmail.com>

On 2018-12-31 14:23, Pavel Stehule wrote:
> st 21. 11. 2018 v 8:24 odesílatel Pavel Stehule 
> <pavel.stehule@gmail.com>

> [schema-variables-20181231-01.patch.gz]

Hi Pavel,

I gave this a quick try-out with the script I had from previous 
versions,
and found these two errors:

------------
drop schema if exists schema1 cascade;
create schema if not exists schema1;
drop variable if exists schema1.myvar1;  --> error 49
create variable schema1.myvar1 as text ;
select schema1.myvar1;
let schema1.myvar1 = 'variable value ""';
select schema1.myvar1;
alter variable schema1.myvar1 rename to myvar2;
select schema1.myvar2;
create variable schema1.myvar1 as text ;
let schema1.myvar1 = 'variable value ""';
select schema1.myvar1;
alter variable schema1.myvar1 rename to myvar2; --> error 4287
select schema1.myvar2;
------------


The above, ran with   psql -qXa  gives the following output:

drop schema if exists schema1 cascade;
create schema if not exists schema1;
drop variable if exists schema1.myvar1;  --> error 49
ERROR:  unrecognized object type: 49
create variable schema1.myvar1 as text ;
select schema1.myvar1;
  myvar1
--------

(1 row)

let schema1.myvar1 = 'variable value ""';
select schema1.myvar1;
       myvar1
-------------------
  variable value ""
(1 row)

alter variable schema1.myvar1 rename to myvar2;
select schema1.myvar2;
       myvar2
-------------------
  variable value ""
(1 row)

create variable schema1.myvar1 as text ;
let schema1.myvar1 = 'variable value ""';
select schema1.myvar1;
       myvar1
-------------------
  variable value ""
(1 row)

alter variable schema1.myvar1 rename to myvar2; --> error 4287
ERROR:  unsupported object class 4287
select schema1.myvar2;
       myvar2
-------------------
  variable value ""
(1 row)



thanks,


Erik Rijkers






reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: er@xs4all.nl, pavel.stehule@gmail.com, a.zakirov@postgrespro.ru, dean.a.rasheed@gmail.com, coelho@cri.ensmp.fr, gilles.darold@dalibo.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: [HACKERS] proposal: schema variables
  In-Reply-To: <df879d16a6cf3f7b4bb6f56f036ea2fa@xs4all.nl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox