Re: [HACKERS] Alternative to LIMIT in SELECT ? - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] Alternative to LIMIT in SELECT ?
Date
Msg-id 199810140512.BAA17725@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] Alternative to LIMIT in SELECT ?  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Responses Re: [HACKERS] Alternative to LIMIT in SELECT ?  (Tatsuo Ishii <t-ishii@sra.co.jp>)
List pgsql-hackers
Applied, with one question.


> >>> I've found ExecutorLimit() (in executor/execMain.c) is useful for me
> >>> especially when issuing an ad-hock query via psql. I personally use
> >>> the function with customized set command.
> >>
> >>Looks interesting. So where are the patches? :)
> >
> >I'll post pacthes within 24 hours:-)
>
> Here it is.
> + #ifdef QUERY_LIMIT
> + static bool
> + parse_query_limit(const char *value)
> + {
> +   int32 limit;
> +
> +   if (value == NULL) {
> +     reset_query_limit();
> +     return(TRUE);
> +   }

Any idea how 'value' could be null?  I could not see how that would
happen.  I can see how GEQO could have a NULL when you say ON, and no
value.  Same with rplans.



--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: [HACKERS] Alternative to LIMIT in SELECT ?
Next
From: Tatsuo Ishii
Date:
Subject: Re: [HACKERS] Alternative to LIMIT in SELECT ?