Re: [HACKERS] Re: psql and comments - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Re: psql and comments
Date
Msg-id 29773.939318310@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Re: psql and comments  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: [HACKERS] Re: psql and comments
List pgsql-hackers
Bruce Momjian <maillist@candle.pha.pa.us> writes:
>> Efficiency is all, along with (probably) the backend being unhappy
>> getting *only* a comment and no query.

> 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...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] psql and comments
Next
From: Roberto Cornacchia
Date:
Subject: Top N queries and disbursion