Re: Temp Tables & Connection Pooling

From: Gerald Gutierrez <pozix(at)home(dot)com>
To: David Olbersen <dave(at)slickness(dot)org>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Temp Tables & Connection Pooling
Date: 2001-03-03 15:43:24
Message-ID: 5.0.2.1.0.20010303073950.02a1a388@mail.rchmd1.bc.wave.home.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

At 12:48 PM 3/2/2001 -0800, David Olbersen wrote:
>On Fri, 2 Mar 2001, Gerald Gutierrez wrote:
>
>->Recently I wanted to implement Dijkstra's algorithm as a stored procedure,
>->and finding that PL/PGSQL cannot return record sets, I thought about using
>->a temporary table for the results. If tempoary tables are session-specific,
>->however, then wouldn't connection pooling make it unusable since the table
>->might "disappear" from one query to the next? What are alternative
>->approaches to implementing Dijkstra's algorithm inside the database?
>
><newbie>
>Wouldn't a VIEW do what you want?
></newbie>

No it wouldn't. Executing Dijkstra would involve executing iterative logic
on multiple tables and storing intermediate results in a form that can be
returned to the user but does not affect the actual persistent table schema
(e.g. a record set, or a temporary table). A view is used to provide a
simplified or alternative way of looking at a set of data, and cannot
cannot generally multi-step operation that data prior to returning to the user.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Ian Harding 2001-03-03 17:38:44 Re: Temp Tables & Connection Pooling
Previous Message Richard Huxton 2001-03-03 15:32:07 Re: Temp Tables & Connection Pooling