From: Scott Marlowe <scott.marlowe@gmail.com>
To: giuseppe.derossi@email.it
Cc: Medi Montaseri <montaseri@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: how to call sql code without function
Date: Tue, 21 Aug 2007 10:30:24 -0500
Message-ID: <dcc563d10708210830n32d948f8qbb0e49222fae031f@mail.gmail.com> (raw)
In-Reply-To: <cebd74b67f3abf8a082a9ae345297b28@83.225.111.96>
References: <cebd74b67f3abf8a082a9ae345297b28@83.225.111.96>
On 8/21/07, giuseppe.derossi@email.it <giuseppe.derossi@email.it> wrote:
>
> Hi Medi,
> Last night, I wrote a function which perfoms a subset of queries and returns
> the results of a temporary table. It's more fast than I believe and that's
> ok to me.
> There is a prolem : It works too fine. I'm afraid of Murphy's law. I red
> into the Internet that there are problem when there is a temporary table in
> a function. My queries are in direct way, that is, without Execute
> statement.
>
> What kind of problem can arise (session,caching, and so on) ? which should
> be the solution ?
The only real danger of using temp tables is that if you don't vacuum
often enough the system catalogs can get bloated. Also, if you create
a new connection for each access, then you might wind up with a lot of
pg_temp_xxx schemas laying about, but they don't really hurt anything.
Generally speaking temp tables in postgresql are pretty well behaved.
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-admin@postgresql.org
Cc: scott.marlowe@gmail.com, giuseppe.derossi@email.it, montaseri@gmail.com
Subject: Re: how to call sql code without function
In-Reply-To: <dcc563d10708210830n32d948f8qbb0e49222fae031f@mail.gmail.com>
* 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