pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PFC <lists@peufeu.com>
To: Jim C. Nasby <jnasby@pervasive.com>
Cc: pgsql-performance@postgresql.org
Cc: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Big IN() clauses etc : feature proposal
Date: Wed, 10 May 2006 21:35:39 +0200
Message-ID: <op.s9coppqfcigqcu@apollo13> (raw)
In-Reply-To: <20060510192401.GQ99570@pervasive.com>
References: <445F7FF8.6070707@comcast.net>
	<1147110142.32369.7.camel@archimedes>
	<20060508175013.GY99570@pervasive.com>
	<28288.1147111196@sss.pgh.pa.us>
	<op.s89zl30wcigqcu@apollo13>
	<8764kfz1iq.fsf@stark.xeocode.com>
	<op.s9alfhjrcigqcu@apollo13>
	<20060510192401.GQ99570@pervasive.com>


> On Tue, May 09, 2006 at 06:29:31PM +0200, PFC wrote:
>> 	You mean the cursors'storage is in fact the same internal machinery
>> 	as a  temporary table ?
>
> Use the source, Luke...

	LOL, yeah, I should have, sorry.

> See tuplestore_begin_heap in backend/utils/sort/tuplestore.c and
> heap_create_with_catalog in backend/catalog/heap.c. You'll find that
> creating a tuplestore is far easier than creating a temp table.

	I had used intuition (instead of the source) to come at the same  
conclusion regarding the level of complexity of these two...
	But I'll look at the source ;)

> Perhaps it would be worth creating a class of temporary tables that used
> a tuplestore, although that would greatly limit what could be done with
> that temp table.

	Just selecting from it I guess, but that's all that's needed. Anymore  
would duplicate the functionality of a temp table.
	I find cursors awkward. The application can FETCH from them, but postgres  
itself can't do it in SQL, unless using FOR.. IN in plpgsql...
	It would be a powerful addition to be able to split queries, factor out  
common parts between multiple queries, etc, using this system, it can even  
be used to execute an inner part of a query, then plan the rest according  
to the results and execute it... without the overhead of a temp table.






view thread (44+ messages)  latest in thread

Message-ID: <op.s9coppqfcigqcu@apollo13>
Permalink:  ../op.s9coppqfcigqcu@apollo13/
Also on:    postgresql.org/message-id/op.s9coppqfcigqcu@apollo13

 · 

reply

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-performance@postgresql.org
  Cc: lists@peufeu.com, jnasby@pervasive.com, pgsql-hackers@postgresql.org
  Subject: Re: [HACKERS] Big IN() clauses etc : feature proposal
  In-Reply-To: <op.s9coppqfcigqcu@apollo13>

* 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