Re: PostgresQL equivalent of NOCOUNT

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jochem van Dieten <jochemd(at)oli(dot)tudelft(dot)nl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PostgresQL equivalent of NOCOUNT
Date: 2001-08-14 17:28:14
Message-ID: 19290.997810094@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jochem van Dieten <jochemd(at)oli(dot)tudelft(dot)nl> writes:
>> Uh ... why? Seems like a useless anti-feature. Certainly suppressing
>> the count wouldn't save a noticeable number of cycles.

> I am not in it for the cycles, just for the laziness ;)
> Currently working with a ColdFusion frontend through ODBC, and
> ColdFusion is unable to return 2 resultsets for one call to cfquery (the
> ColdFusion query implementation).

Oh. So your problem is not that you don't want to know the number of
rows, it's that you don't want any result indication at all for the
INSERT query.

In libpq you could submit two queries as a single query string

PQexec("INSERT ... ; SELECT ...");

and PQexec would throw away the INSERT result indicator and only return
the SELECT result. I am not sure if ODBC works similarly, but you could
discuss that with the ODBC guys.

In any case, I see inadequate reason here to justify breaking the FE/BE
protocol (one response per query), which is what it would take to do
what you're asking from the backend side. Even if we did, it's not at
all clear that that would make ColdFusion work the way you're hoping.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Robert J. Sanford, Jr. 2001-08-14 17:58:58 RE: postgreSQL on windows2000
Previous Message Stephan Szabo 2001-08-14 16:35:02 Re: Is the bug system active?