pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedCREATE TEMPORARY TABLE .. ON COMMIT DROP question
3+ messages / 2 participants
[nested] [flat]
* CREATE TEMPORARY TABLE .. ON COMMIT DROP question
@ 2004-11-19 14:05 Riccardo G. Facchini <abief_ag_-postgresql@yahoo.com>
2004-11-19 15:08 ` Re: CREATE TEMPORARY TABLE .. ON COMMIT DROP question Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 3+ messages in thread
From: Riccardo G. Facchini @ 2004-11-19 14:05 UTC (permalink / raw)
To: pgsql-sql
Hi all,
I'm trying to understand where the "[ ON COMMIT { PRESERVE ROWS |
DELETE ROWS | DROP } ]" is stored when defining a temporary table.
whenever a table is created, a record in the pg_class is stored with
the info regarding the table, but I haven't been able to locate where
the info regarding these particular parameters is stored.
any suggestion?
regards,
Riccardo
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: CREATE TEMPORARY TABLE .. ON COMMIT DROP question
2004-11-19 14:05 CREATE TEMPORARY TABLE .. ON COMMIT DROP question Riccardo G. Facchini <abief_ag_-postgresql@yahoo.com>
@ 2004-11-19 15:08 ` Tom Lane <tgl@sss.pgh.pa.us>
2004-11-19 15:54 ` Re: CREATE TEMPORARY TABLE .. ON COMMIT DROP question Riccardo G. Facchini <abief_ag_-postgresql@yahoo.com>
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 2004-11-19 15:08 UTC (permalink / raw)
To: abief_ag_-postgresql@yahoo.com; +Cc: pgsql-sql
"Riccardo G. Facchini" <abief_ag_-postgresql@yahoo.com> writes:
> I'm trying to understand where the "[ ON COMMIT { PRESERVE ROWS |
> DELETE ROWS | DROP } ]" is stored when defining a temporary table.
I don't believe it's stored anyplace visible :-(. There's some private
state in the memory of the backend that owns the table. Look into
commands/tablecmds.c.
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: CREATE TEMPORARY TABLE .. ON COMMIT DROP question
2004-11-19 14:05 CREATE TEMPORARY TABLE .. ON COMMIT DROP question Riccardo G. Facchini <abief_ag_-postgresql@yahoo.com>
2004-11-19 15:08 ` Re: CREATE TEMPORARY TABLE .. ON COMMIT DROP question Tom Lane <tgl@sss.pgh.pa.us>
@ 2004-11-19 15:54 ` Riccardo G. Facchini <abief_ag_-postgresql@yahoo.com>
0 siblings, 0 replies; 3+ messages in thread
From: Riccardo G. Facchini @ 2004-11-19 15:54 UTC (permalink / raw)
To: pgsql-sql
--- Tom Lane <__> wrote:
> "Riccardo G. Facchini" <abief_ag_-postgresql@yahoo.com> writes:
> > I'm trying to understand where the "[ ON COMMIT { PRESERVE ROWS |
> > DELETE ROWS | DROP } ]" is stored when defining a temporary table.
>
> I don't believe it's stored anyplace visible :-(. There's some
> private
> state in the memory of the backend that owns the table. Look into
> commands/tablecmds.c.
>
> regards, tom lane
>
[..]
Thanks, I'm reading the code at this right moment.
I'm wandering if this is consistent... I mean, a temporary table finds
its way to the pg_class as any other table, so I'm able to retrieve a
lot of things regarding that particular table. Even if a temporary
table is something that's assumed to be built by my own session, I may
want to know if what I store there is eventually destroyed.
this would mean extending the pg_class definition and generating the
associated code... not a big job, but something that may not be done
lightly.
I'm writing a set of utilities that run on pure plpgsql that provide
info about the objects contained in the database, and I started with
one of those things that are not provided by the pg_xxx functions, the
table. My code is capable of rendering the code of a temporary table,
but not capturing the info regarding the "ON COMMIT" part...
regards,
R.
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2004-11-19 15:54 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-11-19 14:05 CREATE TEMPORARY TABLE .. ON COMMIT DROP question Riccardo G. Facchini <abief_ag_-postgresql@yahoo.com>
2004-11-19 15:08 ` Tom Lane <tgl@sss.pgh.pa.us>
2004-11-19 15:54 ` Riccardo G. Facchini <abief_ag_-postgresql@yahoo.com>
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