Re: Updated CREATE FUNCTION syntax

From: Mike Mascari <mascarm(at)mascari(dot)com>
To: Joel Burton <joel(at)joelburton(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Updated CREATE FUNCTION syntax
Date: 2002-05-16 19:56:28
Message-ID: 3CE40EEC.63E10FB3@mascari.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Joel Burton wrote:
>
> > As per earlier vague hint, I'm bringing the CREATE FUNCTION syntax in line
> > with SQL99. Everything is fully backward compatible. Here is the new
> > synopsis:
> >
> > CREATE [OR REPLACE] FUNCTION name (args) RETURNS type
> > option [ option... ] [WITH (...)];
> >
> > where option is any of these in any order:
> >
> > AS string [,string]
> > LANGUAGE name
> > IMMUTABLE
> > STABLE
> > VOLATILE
> > CALLED ON NULL INPUT -- SQL spelling of not "strict"
> > RETURNS NULL ON NULL INPUT -- SQL spelling of "strict"
> > STRICT
> > [EXTERNAL] SECURITY DEFINER -- SQL spelling of "setuid"
> > [EXTERNAL] SECURITY INVOKER -- SQL spelling of not "setuid"
> > IMPLICIT CAST
> >
> > (The SECURITY options are noops right now, but I'm planning to implement
> > them next.)
> >
> > The WITH (...) options are still there, but sort of less encouraged, I
> > guess.
>
> Is there any standardized way of handling the single-quotes within function
> definition? Rather than doubling them up (which can make for very messy code
> when your scripting language uses single quotes!), allowing another symbol
> to be used, with that symbol be declared in the CREATE FUNCTION line?
> Interbase uses a system like this: you can set the delimiter to anything you
> want and use that instead of '.

That would be great! The quoting makes pl/pgsql a major pain. It, and
dependency tracking. Of course, with PL/SQL, Oracle doesn't even require
a delimiter:

CREATE PROCEDURE foo(x INTEGER) AS
...
END;

Somehow they manage to get that past their parser, even if the procedure
has "Compilation Errors". It would be sweet...

Mike Mascari
mascarm(at)mascari(dot)com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Naeslund(f) 2002-05-16 20:10:03 Re: WIN32 native ... lets start?!?
Previous Message Andrew Sullivan 2002-05-16 19:54:32 Re: [HACKERS] Re : Solaris Performance - 64 bit puzzle