From 2f35b4efdbec6c161ca9bd491d6345134910c425 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 26 Oct 2000 21:38:24 +0000 Subject: Re-implement LIMIT/OFFSET as a plan node type, instead of a hack in ExecutorRun. This allows LIMIT to work in a view. Also, LIMIT in a cursor declaration will behave in a reasonable fashion, whereas before it was overridden by the FETCH count. --- src/backend/executor/functions.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/backend/executor/functions.c') diff --git a/src/backend/executor/functions.c b/src/backend/executor/functions.c index 58fb68a6113..e5a5e55ef8d 100644 --- a/src/backend/executor/functions.c +++ b/src/backend/executor/functions.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.38 2000/08/24 03:29:03 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.39 2000/10/26 21:35:15 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -135,9 +135,6 @@ init_execution_state(char *src, Oid *argOidVect, int nargs) None); estate = CreateExecutorState(); - if (queryTree->limitOffset != NULL || queryTree->limitCount != NULL) - elog(ERROR, "LIMIT clause from SQL functions not yet implemented"); - if (nargs > 0) { int i; @@ -328,7 +325,7 @@ postquel_getnext(execution_state *es) feature = (LAST_POSTQUEL_COMMAND(es)) ? EXEC_RETONE : EXEC_RUN; - return ExecutorRun(es->qd, es->estate, feature, (Node *) NULL, (Node *) NULL); + return ExecutorRun(es->qd, es->estate, feature, 0L); } static void -- cgit v1.2.3