![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I need to select all tuples from a table, but need them to be fetched with a constant delay (say 1 sec) between every consecutive tuples. The first idea that came up to my mind is to create a DelayedSeqScan operator, and put delay before returning the scanned tuple. Can I do this functionality using table functions? Regards, --h |
#3
| |||
| |||
|
|
I need to select all tuples from a table, but need them to be fetched with a constant delay (say 1 sec) between every consecutive tuples. The first idea that came up to my mind is to create a DelayedSeqScan operator, and put delay before returning the scanned tuple. Can I do this functionality using table functions? |
#4
| |||
| |||
|
|
I need to select all tuples from a table, but need them to be fetched with a constant delay (say 1 sec) between every consecutive tuples. The first idea that came up to my mind is to create a DelayedSeqScan operator, and put delay before returning the scanned tuple. Can I do this functionality using table functions? Regards, --h ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html |
#5
| |||
| |||
|
|
I need to select all tuples from a table, but need them to be fetched with a constant delay (say 1 sec) between every consecutive tuples. The first idea that came up to my mind is to create a DelayedSeqScan operator, and put delay before returning the scanned tuple. Can I do this functionality using table functions? Regards, --h |
#6
| |||
| |||
|
|
I need this for a side project. Is there a way to do something like this: SELECT * FROM DelayedTable('tablename', 5); |
#7
| |||
| |||
|
|
I need this for a side project. Is there a way to do something like this: SELECT * FROM DelayedTable('tablename', 5); |
#8
| |||
| |||
|
|
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 incendiándose", 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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |