Re: Incremental results from libpq

Lists: pgsql-interfaces
From: "Goulet, Dick" <DGoulet(at)vicr(dot)com>
To: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Peter Eisentraut" <peter_e(at)gmx(dot)net>, <pgsql-interfaces(at)postgresql(dot)org>, "Scott Lamb" <slamb(at)slamb(dot)org>
Subject: Re: Incremental results from libpq
Date: 2005-11-17 14:29:17
Message-ID: 4001DEAF7DF9BD498B58B45051FBEA6502EF5628@25exch1.vicorpower.vicr.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-interfaces

Alvaro,

You are quite correct, which is functionally the only
difference. Personally I don't think that really amounts to "a hill of
beans". The functionality is the same, even if the syntax is a touch
different. Course, I didn't get a chance to tinker with this, but in
Oracle a global temp table can have indexes and constraints. Is the
same true in Postgresql?? I've found it to be a performance improver
where your loading the temp table with thousands of rows.

-----Original Message-----
From: Alvaro Herrera [mailto:alvherre(at)commandprompt(dot)com]
Sent: Wednesday, November 16, 2005 7:51 PM
To: Bruce Momjian
Cc: Goulet, Dick; Tom Lane; Peter Eisentraut;
pgsql-interfaces(at)postgresql(dot)org; Scott Lamb
Subject: Re: [INTERFACES] Incremental results from libpq

Bruce Momjian wrote:
> Goulet, Dick wrote:
>
> > If I may, one item that would be of extreme use to our location
> > would be global temporary tables. These have existed since Oracle
9.0.
> > They are defined once and then used by clients as needed. Each
session
> > is ignorant of the data of any other session and once you disconnect
the
> > data from the session disappears. Truly a real temporary table.
>
> How is it better than what we have now?

Global temporary tables are defined only once (not once per session),
and the schema (definition) is known to all sessions. Only the content
is private to each session.

At least that's what I remember since the last time I read the spec on
it ...

--
Alvaro Herrera
http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: "Goulet, Dick" <DGoulet(at)vicr(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-interfaces(at)postgresql(dot)org, Scott Lamb <slamb(at)slamb(dot)org>
Subject: Re: Incremental results from libpq
Date: 2005-11-18 00:34:30
Message-ID: 200511180034.jAI0YUO23634@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-interfaces

Goulet, Dick wrote:
> Alvaro,
>
> You are quite correct, which is functionally the only
> difference. Personally I don't think that really amounts to "a hill of
> beans". The functionality is the same, even if the syntax is a touch
> different. Course, I didn't get a chance to tinker with this, but in
> Oracle a global temp table can have indexes and constraints. Is the
> same true in Postgresql?? I've found it to be a performance improver
> where your loading the temp table with thousands of rows.

Sure, you can create TEMPORARY anything, and because each backend has
its own table, performance is better.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073