Re: delayed input

From: "Hicham G(dot) Elmongui" <elmongui(at)cs(dot)purdue(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: delayed input
Date: 2004-10-22 20:21:59
Message-ID: clbq4s$1kpo$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Well, it seems that i have to build the scan operator myself. Even the
FunctionScan will make all the function calls and stores the result in a
tuuplestore. So, all the delay will be occured only at the first function
invocation.
--h

"Alvaro Herrera" <alvherre(at)dcc(dot)uchile(dot)cl> wrote in message
news:20041019191943(dot)GC5625(at)dcc(dot)uchile(dot)cl(dot)(dot)(dot)
> On Tue, Oct 19, 2004 at 01:44:34PM -0500, Hicham G. Elmongui wrote:
> > I need this for a side project. Is there a way to do something like
this:
> >
> > SELECT *
> > FROM DelayedTable('tablename', 5);
>
> You can probably build a sleep() function in C, and then use that to
> cause delaying in a PL/pgSQL set-returning function. Something like
>
> #include <postgres.h>
> #include <fmgr.h>
>
> PG_FUNCTION_INFO_V1(sleep);
>
> Datum
> sleep(PG_FUNCTION_ARGS)
> {
> int32 delay = PG_GETARG_INT32(0);
> sleep(delay);
> PG_RETURN_VOID();
> }
>
> --
> Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
> La web junta la gente porque no importa que clase de mutante sexual seas,
> tienes millones de posibles parejas. Pon "buscar gente que tengan sexo con
> ciervos incendindose", y el computador dir "especifique el tipo de
ciervo"
> (Jason Alexander)
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Hicham G. Elmongui 2004-10-22 20:23:51 unexpected field count in D message
Previous Message Cott Lang 2004-10-22 20:19:23 Re: Problem with query plan