From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Postgres Hackers List <hackers(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] Re: psql and comments |
Date: | 1999-10-07 23:28:15 |
Message-ID: | 1128.939338895@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> writes:
>>>> That is fixed now.
>>
>> Is it? postgres.c treats an all-whitespace input as an empty query,
>> but if you pass it a comment and nothing else it will cycle the parser/
>> planner/executor, and I'm not sure every phase of that process behaves
>> reasonably on empty input. Also, that path will not produce the
>> "empty query" response code that you get from all-whitespace input.
>> I *think* libpq doesn't depend on that anymore, but other frontend
>> libraries might...
> postgres -D /u/pg/data test
> POSTGRES backend interactive interface
> $Revision: 1.130 $ $Date: 1999/09/29 16:06:10 $
backend> -- test
backend>
> Is that what you mean?
OK, so the parser/planner/executor can cope with dummy input. That's
good. There's still the problem of returning an 'empty query' response
to the frontend. I think you'd probably need to hack up postgres.c
so that when the querytree list produced by the parser is NIL, the
IsEmptyQuery flag gets set --- this could be done instead of, rather
than in addition to, the current test for an all-whitespace input
buffer.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1999-10-07 23:53:17 | Re: [HACKERS] Re: Top N queries and disbursion |
Previous Message | Tom Lane | 1999-10-07 23:16:58 | Re: Top N queries and disbursion |