Re: CREATE TEMP TABLE AS SELECT/ GET DIAGNOSTICS ROW_COUNT

From: Alvaro Herrera <alvherre(at)surnet(dot)cl>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, MLikharev(at)micropat(dot)com, pgsql-general(at)postgresql(dot)org
Subject: Re: CREATE TEMP TABLE AS SELECT/ GET DIAGNOSTICS ROW_COUNT
Date: 2005-05-31 19:25:22
Message-ID: 20050531192521.GB9257@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-05-31 19:43:56 Re: CREATE TEMP TABLE AS SELECT/ GET DIAGNOSTICS ROW_COUNT
Previous Message Bob Pawley 2005-05-31 19:24:04 Newby to DB