Re: PostgresQL equivalent of NOCOUNT - Mailing list pgsql-general

From Tom Lane
Subject Re: PostgresQL equivalent of NOCOUNT
Date
Msg-id 19290.997810094@sss.pgh.pa.us
Whole thread Raw
In response to Re: PostgresQL equivalent of NOCOUNT  (Jochem van Dieten <jochemd@oli.tudelft.nl>)
List pgsql-general
Jochem van Dieten <jochemd@oli.tudelft.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

pgsql-general by date:

Previous
From: "Christopher Masto"
Date:
Subject: Re: Problems with Blank space
Next
From: "Niall Litchfield"
Date:
Subject: Re: Future: Oracle corporation goes bankrupt!! (CIA, KGB, British Intelligence reports)