Re: proposal: schema PL session variables

From: Marko Tiikkaja <marko(at)joh(dot)to>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Oleg Bartunov <obartunov(at)gmail(dot)com>
Subject: Re: proposal: schema PL session variables
Date: 2016-02-08 12:03:16
Message-ID: 56B88404.3090308@joh.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 08/02/16 09:16, Pavel Stehule wrote:
> Usage
> =====
>
> DROP SCHEMA IF EXISTS test_schema CASCADE;
> SET SCHEMA test_schema;
>
> CREATE SCHEMA VARIABLE local_counter AS int DEFAULT 0;
>
> CREATE OR REPLACE FUNCTION increment_counter()
> RETURNS void AS $$
> BEGIN
> local_counter := local_counter + 1;
> END;
> $$ LANGUAGE plpgsql;

How does this function know which schema variables are visible?

.m

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2016-02-08 12:11:22 Re: postgres_fdw join pushdown (was Re: Custom/Foreign-Join-APIs)
Previous Message Michael Meskes 2016-02-08 11:59:17 Re: backpatch for REL9_4_STABLE of commit 40482e606733675eb9e5b2f7221186cf81352da1