Обсуждение: query string returned when no records matched

Поиск
Список
Период
Сортировка

query string returned when no records matched

От
"LLOYD,DAN (HP-Boise,ex1)"
Дата:
When using PostgreSQL 7.3.x on either Linux or HP-UX hosts, the SQL query
string is returned when the query finishes without error but finds no
matching records.  This ends up being visible in the client's web browser.

An example search would start like "SELECT DISTINCT ON (test_result_name,
entry_time) entry_time, ..." then show up in the html as plain text that is
created in the JavaServer Page (JSP).  The same thing happens when running
the query in Webmin which is not tied to anything I wrote.

What I am looking for is hopefully some PostgreSQL configuration setting to
suppress the query string being reflected back to me.  The JSP handles the
resulting empty table just fine but the string pollutes the html page.

TIA,Dan

Re: query string returned when no records matched

От
Tom Lane
Дата:
"LLOYD,DAN (HP-Boise,ex1)" <dan.lloyd@hp.com> writes:
> When using PostgreSQL 7.3.x on either Linux or HP-UX hosts, the SQL query
> string is returned when the query finishes without error but finds no
> matching records.  This ends up being visible in the client's web browser.

I can assure you there is no such behavior in the Postgres backend.
Look to your client-side code.

            regards, tom lane

Re: query string returned when no records matched

От
"LLOYD,DAN (HP-Boise,ex1)"
Дата:
    Thanks for the response and you are correct.  The client code is the
dbtags library from Apache's Jakarta taglib project for JavaServer Pages.
For future reference see
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4877 in case someone else
runs into this.

    Regards,
    Dan

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Monday, July 21, 2003 11:48 PM
To: LLOYD,DAN (HP-Boise,ex1)
Cc: 'pgsql-novice@postgresql.org'
Subject: Re: [NOVICE] query string returned when no records matched


"LLOYD,DAN (HP-Boise,ex1)" <dan.lloyd@hp.com> writes:
> When using PostgreSQL 7.3.x on either Linux or HP-UX hosts, the SQL query
> string is returned when the query finishes without error but finds no
> matching records.  This ends up being visible in the client's web browser.

I can assure you there is no such behavior in the Postgres backend.
Look to your client-side code.

            regards, tom lane