RE: AW: [HACKERS] Begin statement again

Michael Meskes <meskes@topsystem.de>

From: "Meskes, Michael" <meskes@topsystem.de>
To: Zeugswetter Andreas <andreas.zeugswetter@telecom.at>, sferac@bo.nettuno.it
Cc: "'Michael Meskes'" <meskes@topsystem.de>, "'pgsql-hackers@hub.org'" <pgsql-hackers@hub.org>
Date: 1998-03-14T18:20:41Z
Lists: pgsql-hackers
We, that is ecpg, will need BEGIN and END to include blocks of Pl/pgSQL.
I think this can be modelled after ORACLE's PL/SQL. in your embedded SQL
code you say:

	...
	exec sql begin;
		<some PL/SQL code, for instance the call of a stored
procedure>
	exec sql end;
	...

And I'd really like to call a stored procedure from my C program.

Michael
--
Dr. Michael Meskes, Projekt-Manager    | topystem Systemhaus GmbH
meskes@topsystem.de                    | Europark A2, Adenauerstr. 20
meskes@debian.org                      | 52146 Wuerselen
Go SF49ers! Use Debian GNU/Linux!      | Tel: (+49) 2405/4670-44

> ----------
> From: 	sferac@bo.nettuno.it[SMTP:sferac@bo.nettuno.it]
> Sent: 	Freitag, 13. März 1998 18:28
> To: 	Zeugswetter Andreas
> Cc: 	'Michael Meskes'; 'pgsql-hackers@hub.org'
> Subject: 	Re: AW: [HACKERS] Begin statement again
> 
> On Fri, 13 Mar 1998, Zeugswetter Andreas wrote:
> 
> > I think we should depreciate the BEGIN/END keywords in SQL to allow
> them
> > to be used for the new PL/SQL. So definitely leave them out of ecpg
> now.
> > Only accept BEGIN WORK and BEGIN TRANSACTION. (do a sequence of
> commit work; begin work) 
> 
> Apologies for intrusion.
> 
> I think we don't need BEGIN/END at all, these statements aren't SQL
> standard.
> END is an alias for COMMIT.
> (why do we need two statements to do the same thing?).
> 
> from man commit:
>        "...
>        This   commands  commits  the  current  transaction.   All
>        changes made by the transaction become visible  to  others
>        and  are guaranteed to be durable if a crash occurs.
>        COMMIT is functionally equivalent to the END command"
>        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> from man begin:
>        "...
>        commands  commits  the  current  transaction.   All
>        changes made by the transaction become visible  to  others
>        and are guaranteed to be durable if a crash occurs."
> 
> and BEGIN should be changed to SQL standard SET TRANSACTION statement.
> -------
> PS:
>     I think PL/pgSQL is an eccellent idea. Go for it.
>                                                             Ciao,
> Jose'
> 
>