Unix Technical Forum

CREATE TEMP TABLE AS SELECT/ GET DIAGNOSTICS ROW_COUNT again

This is a discussion on CREATE TEMP TABLE AS SELECT/ GET DIAGNOSTICS ROW_COUNT again within the Pgsql General forums, part of the PostgreSQL category; --> Hello! According to Tom's message http://archives.postgresql.org/pgsql...6/msg00476.php we have the stuff supposed to return number of rows affected by CREATE ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql General

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-09-2008, 05:56 AM
Ilja Golshtein
 
Posts: n/a
Default CREATE TEMP TABLE AS SELECT/ GET DIAGNOSTICS ROW_COUNT again

Hello!

According to Tom's message
http://archives.postgresql.org/pgsql...6/msg00476.php
we have the stuff supposed to return number of rows affected by
CREATE .. AS SELECT or SELECT ... INTO in 8.1 beta.

The patch is at place, though PQcmdTuples returns nothing. It's not
a big surprise considering PQcmdTuples likes INSERT, DELETE, FETCH
or MOVE only. The real pain is cmdStatus does not contain number
of affected rows.

Any suggestions? Is it possible to calculate number of rows
in newly created table without explicit SELECT COUNT(*)?
I don't use PL/pgSQL.

Thanks a lot.

--
Best regards
Ilja Golshtein

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-09-2008, 06:00 AM
Bruce Momjian
 
Posts: n/a
Default Re: CREATE TEMP TABLE AS SELECT/ GET DIAGNOSTICS ROW_COUNT


This change relates only to SPI, meaning plpsql. It does not help libpq.

---------------------------------------------------------------------------

Ilja Golshtein wrote:
> Hello!
>
> According to Tom's message
> http://archives.postgresql.org/pgsql...6/msg00476.php
> we have the stuff supposed to return number of rows affected by
> CREATE .. AS SELECT or SELECT ... INTO in 8.1 beta.
>
> The patch is at place, though PQcmdTuples returns nothing. It's not
> a big surprise considering PQcmdTuples likes INSERT, DELETE, FETCH
> or MOVE only. The real pain is cmdStatus does not contain number
> of affected rows.
>
> Any suggestions? Is it possible to calculate number of rows
> in newly created table without explicit SELECT COUNT(*)?
> I don't use PL/pgSQL.
>
> Thanks a lot.
>
> --
> Best regards
> Ilja Golshtein
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org
>


--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-09-2008, 06:01 AM
Ilja Golshtein
 
Posts: n/a
Default Re: CREATE TEMP TABLE AS SELECT/ GET DIAGNOSTICS ROW_COUNT again

Hi!

>This change relates only to SPI, meaning plpsql. It does not help libpq.


Thanks for response.

I see.

Any hope it would be possible
to calculate number of rows inserted
in newly created table via
CREATE .. AS SELECT?

--
Best regards
Ilja Golshtein

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:31 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com