Re: Controlling changes in plpgsql variable resolution

From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Stephen Frost <sfrost(at)snowman(dot)net>
Subject: Re: Controlling changes in plpgsql variable resolution
Date: 2009-10-19 19:13:38
Message-ID: A6D45BB3-3993-4DF8-A536-EC62464E06C6@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Oct 19, 2009, at 12:05 PM, Tom Lane wrote:

>> What about adopting the modifier syntax you're adding to COPY?
>
> Where exactly would you put the modifier, and why is that better than
> the existing #option convention?

CREATE OR REPLACE FUNCTION foo()
RETURNS BOOLEAN
LANGUAGE plpgsql WITH opt1, opt2
AS $$...$$;

That is, the specification of options is made outside of the language
in question. It might only effect a particular language (plpgsql in
this case) and be ignored otherwise (or trigger an exception), but
it's clean and very much like what you have elsewhere.

Best,

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-10-19 19:14:58 Re: Controlling changes in plpgsql variable resolution
Previous Message Eric B. Ridge 2009-10-19 19:12:54 Re: Controlling changes in plpgsql variable resolution