Re: Updated CREATE FUNCTION syntax - Mailing list pgsql-hackers

From Manfred Koizar
Subject Re: Updated CREATE FUNCTION syntax
Date
Msg-id r0laeuob70c84iqlo849jq8du1n6fmff26@4ax.com
Whole thread Raw
In response to Re: Updated CREATE FUNCTION syntax  ("Joel Burton" <joel@joelburton.com>)
List pgsql-hackers
On Fri, 17 May 2002 09:57:39 -0400, "Joel Burton"
<joel@joelburton.com> wrote:
>> -----Original Message-----
>> From: Peter Eisentraut [mailto:peter_e@gmx.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 ;

ServusManfred


pgsql-hackers by date:

Previous
From: Mike Embry
Date:
Subject: Re: www.pgaccess.org - the official story (the way I saw it)
Next
From: Bear Giles
Date:
Subject: SSL client cert patch submitted