Re: Updated CREATE FUNCTION syntax

From: Manfred Koizar <mkoi-pg(at)aon(dot)at>
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-17 19:21:00
Message-ID: r0laeuob70c84iqlo849jq8du1n6fmff26@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 17 May 2002 09:57:39 -0400, "Joel Burton"
<joel(at)joelburton(dot)com> wrote:
>> -----Original Message-----
>> From: Peter Eisentraut [mailto:peter_e(at)gmx(dot)net]
>> Sent: Friday, May 17, 2002 9:37 AM
>> To: Joel Burton
>> Cc: PostgreSQL Development
>> Subject: RE: [HACKERS] Updated CREATE FUNCTION syntax
>>
>> I think we need something like that. How exactly does Interbase "set" the
>> delimiter? Keep in mind that our lexer and parser are static.
>
>Actually, now that I've thought about it for a moment, Interbase doesn't use
>a different delimiter, it allows a different end-of-line character.

Actually it's the end-of-command delimiter, called terminator in
Interbase speech. And it doesn`t have to be a single character, e.g.

SET TERM !! ;

>SELECT * FROM SOMETHING;
>
>SET EOL TO &;
>
>CREATE FUNCTION() RETURNS ... AS
> BEGIN;
> END;
> LANGUAGE plpgsql &

You could even enter any number of commands here, each terminated by
the current terminator:
SELECT * FROM MYTABLE &
DROP TABLE MYTABLE &
SET TERM ! &
SELECT * FROM ANOTHERTABLE !

... before you eventually return to the standard terminator:
SET TERM ; !
SELECT * FROM WHATEVER ;

Servus
Manfred

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-05-17 20:16:18 Re: WIN32 native ... lets start?!?
Previous Message Manfred Koizar 2002-05-17 17:37:26 Re: Queries using rules show no rows modified?