From: Daniel Caune <daniel.caune@ubisoft.com>
To: Gerardo Herzig <gherzig@fmed.uba.ar>
Cc: pgsql-sql@postgresql.org
Subject: Re: SQL stored function inserting and returning data in a row.
Date: Fri, 11 Jan 2008 08:55:02 -0500
Message-ID: <1E293D3FF63A3740B10AD5AAD88535D206F41789@UBIMAIL1.ubisoft.org> (raw)
In-Reply-To: <47874CEB.3010803@fmed.uba.ar>
> What about
> $$
> INSERT INTO .... ;
> select currval('seq_matchmaking_session_id');
> $$ language sql;
>
> ?
Indeed... :-( For some reason, I thought that it was not possible to
have to SQL statement in an SQL stored function.
By the way, is there any performance difference between pure SQL and
PL/pgSQL stored functions? If I remember correctly there was such a
distinction between pure SQL statement and PL/PLSQL stored procedures
(Oracle), in the sense that PL/PLSQL stored procedures are executed
within the PL/PLSQL engine which sends pure SQL statements to the SQL
engine for execution. There is a little overhead between PL/PLSQL and
SQL engines.
Regards,
--
Daniel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: daniel.caune@ubisoft.com, gherzig@fmed.uba.ar
Subject: Re: SQL stored function inserting and returning data in a row.
In-Reply-To: <1E293D3FF63A3740B10AD5AAD88535D206F41789@UBIMAIL1.ubisoft.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox