Re: how to call sql code without function

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

 



On 8/21/07, giuseppe.derossi@xxxxxxxx <giuseppe.derossi@xxxxxxxx> 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.

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux