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