Re: Can the string literal syntax for function definitions please be dropped ?

From: Adrian Klaver <aklaver(at)comcast(dot)net>
To: pgsql-general(at)postgresql(dot)org
Cc: Timothy Madden <terminatorul(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Can the string literal syntax for function definitions please be dropped ?
Date: 2009-10-25 23:41:47
Message-ID: 200910251641.48375.aklaver@comcast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sunday 25 October 2009 3:20:51 pm Timothy Madden wrote:
> On Mon, Oct 26, 2009 at 12:01 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > Timothy Madden <terminatorul(at)gmail(dot)com> writes:
> > > What I want is compatible with existing code and the current default
> > > behavior. Just look for a LANGUAGE SQL declaration in the function
> > > header (before the body).
> > >
> > > If found expect the in-place definition of the function body to follow.
> > > If not found expect a string literal that holds the function body to
> >
> > follow,
> >
> > > with the LANGUAGE declaration after (default behavior).
> >
> > This proposal is unfortunately complete nonsense, because it fails to
> > address the question of how you figure out where the function body
> > *ends*. We have to have a simple and not-language-specific rule for that.
> > Even if the backend could be made smart enough to handle a variety of
> > cases, we could hardly expect client-side code (like psql) to track all
> > the cases. And psql does need to understand where the CREATE FUNCTION
> > command ends, so that it can tell when to ship the command off to the
> > backend.
>
> By the standard the routine body is a <SQL procedure statement> and the
> question of how to figure out where the function body ends should be
> answered
> as such.
>
> I am talking about two cases, the one psql already handles, and the one
> where
> the body is (and ends as) a <SQL procedure statement>, which statement
> again psql should already understand and which is signaled by the
> LANGUAGE SQL declaration in the function header.
>
> Thank you,
> Timothy Madden

You mean something like this ?:
http://dev.mysql.com/doc/refman/5.1/en/stored-programs-defining.html

I am not seeing that as an improvement.

--
Adrian Klaver
aklaver(at)comcast(dot)net

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2009-10-25 23:50:51 Re: Can the string literal syntax for function definitions please be dropped ?
Previous Message Timothy Madden 2009-10-25 23:06:33 Re: Can the string literal syntax for function definitions please be dropped ?