Lists: | pgsql-hackers |
---|
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 17:45:10 |
Message-ID: | 29773.939318310@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)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
From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(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 17:50:30 |
Message-ID: | 199910071750.NAA02744@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
> Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)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...
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?
--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026