Search Postgresql Archives

Re: Sharing data between stored functions?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/05/2015 11:20 AM, Igor Neyman wrote:


-----Original Message-----
From: Adrian Klaver [mailto:adrian.klaver@xxxxxxxxxxx]
Sent: Thursday, March 05, 2015 2:07 PM
To: Igor Neyman; inspector morse
Cc: Merlin Moncure; pgsql-general@xxxxxxxxxxxxxx
Subject: Re:  Sharing data between stored functions?

On 03/05/2015 11:01 AM, Igor Neyman wrote:


Sorry, my reply was based on (old) Oracle knowledge.
Now, I'm wondering too, why PG didn't implement such basic (at least
to
me) feature.

Per my previous post, see:

http://www.postgresql.org/docs/9.4/interactive/sql-createtable.html

Compatibility

The CREATE TABLE command conforms to the SQL standard, with
exceptions listed below.

Temporary Tables
....

Regards,
Igor Neyman

--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx


m.b. I'm missing something, but this quote from docs doesn't explain
"why", it just states that feature is not implemented.

"The SQL standard also distinguishes between global and local temporary
tables, where a local temporary table has a separate set of contents for each
SQL module within each session, though its definition is still shared across
sessions. Since PostgreSQL does not support SQL modules, this distinction is
not relevant in PostgreSQL.
"


Regards,
Igor Neyman



--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx

CCing list.

I can't completely agree with this reasoning.

Well that is something you are going to have to take up with the SQL standards committee:

http://dbis-informatik.uibk.ac.at/files/ext/lehre/ss11/vo-ndbm/lit/ORel-SQL1999-IBM-Nelson-Mattos.pdf

Page 261

http://www.jtc1sc32.org/doc/N2151-2200/32N2153T-text_for_ballot-FDIS_9075-1.pdf

Page 25

May be I'm just used to Oracle's implementation.  Oh, and in Oracle temp tables have nothing to do with SQL modules.
 From Oracle docs:
"Specify GLOBAL TEMPORARY to indicate that the table is temporary and that its definition is visible to all sessions. The data in a temporary table is visible only to the session that inserts the data into the table.
A temporary table has a definition that persists the same as the definitions of regular tables, but it contains either session-specific or transaction-specific data. You specify whether the data is session- or transaction-specific with the ON COMMIT keywords (below)."


Regards,
Igor Neyman




--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux