Re: proposal: schema PL session variables

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

2016-02-08 13:03 GMT+01:00 Marko Tiikkaja <marko(at)joh(dot)to>:

> 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?
>

function see all schema variables from same schema as function's schema

Pavel

>
>
> .m
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marko Tiikkaja 2016-02-08 12:22:50 Re: proposal: schema PL session variables
Previous Message Ashutosh Bapat 2016-02-08 12:11:22 Re: postgres_fdw join pushdown (was Re: Custom/Foreign-Join-APIs)