From: | "Daniel Caune" <daniel(dot)caune(at)ubisoft(dot)com> |
---|---|
To: | "Gerardo Herzig" <gherzig(at)fmed(dot)uba(dot)ar> |
Cc: | <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: SQL stored function inserting and returning data in a row. |
Date: | 2008-01-11 13:55:02 |
Message-ID: | 1E293D3FF63A3740B10AD5AAD88535D206F41789@UBIMAIL1.ubisoft.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-sql |
> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2008-01-11 14:17:53 | Re: SQL stored function inserting and returning data in a row. |
Previous Message | nalini | 2008-01-11 11:39:49 | Re: Postgres replication |
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2008-01-11 14:17:53 | Re: SQL stored function inserting and returning data in a row. |
Previous Message | Marcin Stępnicki | 2008-01-11 11:19:17 | Re: SQL stored function inserting and returning data in a row. |