Re: CREATE TEMP TABLE AS SELECT/ GET DIAGNOSTICS ROW_COUNT - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: CREATE TEMP TABLE AS SELECT/ GET DIAGNOSTICS ROW_COUNT
Date
Msg-id 20050531192521.GB9257@surnet.cl
Whole thread Raw
In response to Re: CREATE TEMP TABLE AS SELECT/ GET DIAGNOSTICS ROW_COUNT  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: CREATE TEMP TABLE AS SELECT/ GET DIAGNOSTICS ROW_COUNT
List pgsql-general
On Tue, May 31, 2005 at 01:03:30AM -0400, Tom Lane wrote:

> So the initial evidence is that this was not an intentional change.
> Do we want to revert it?  The behavior has been in the field now for
> more than a full release cycle --- all 7.4.* releases behave this way
> --- so one could argue that we should leave it be.

Well, probably nobody has complained because nobody uses the behavior.
I think it's wrong to assume that people really depend on this behavior
-- they would be doing something like

SELECT some_columns ...
CREATE TABLE AS SELECT ...
GET DIAGNOSTICS row_count

and expect to get the row_count from the first SELECT rather than CREATE
TABLE AS.  I wouldn't expect that, for one.  Personally I think it
should be reverted.

One thing: I couldn't find GET DIAGNOSTICS documentation for Oracle's
PL/SQL by googling around.  Is this PL/pgSQL-specific stuff?

--
Alvaro Herrera (<alvherre[a]surnet.cl>)
"Hay quien adquiere la mala costumbre de ser infeliz" (M. A. Evans)

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Primary key column numbers...
Next
From: Tom Lane
Date:
Subject: Re: CREATE TEMP TABLE AS SELECT/ GET DIAGNOSTICS ROW_COUNT