dbTalk Databases Forums  

[BUGS] BUG #2096: bug in a SPI sample document

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #2096: bug in a SPI sample document in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Yoshihisa Nakano
 
Posts: n/a

Default [BUGS] BUG #2096: bug in a SPI sample document - 12-07-2005 , 06:59 AM







The following bug has been logged online:

Bug reference: 2096
Logged by: Yoshihisa Nakano
Email address: nakano.yosihisa (AT) jp (DOT) fujitsu.com
PostgreSQL version: 8.1.0
Operating system: RedHat Enterprise Linux ES 3.0
Description: bug in a SPI sample document
Details:

There is a difference between the result of the SPI
example in the doc and the actual result of that.


Doc 40.5 Examples
=> SELECT * FROM a;
x
---
1 -- no rows in a (0) + 1
(1 row)

=> INSERT INTO a VALUES (execq('SELECT * FROM a', 0) + 1);
INFO: EXECQ: 0
INSERT 167713 1


I tried this example, but INFO showed 1, not 0. I
think the value of INFO in doc is wrong, because the
value of row is 1 at this time.

This bug seems to exist also in 7.3.x, 7.4.x and 8.0.x.

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #2096: bug in a SPI sample document - 12-07-2005 , 09:41 AM






"Yoshihisa Nakano" <nakano.yosihisa (AT) jp (DOT) fujitsu.com> writes:
Quote:
=> INSERT INTO a VALUES (execq('SELECT * FROM a', 0) + 1);
INFO: EXECQ: 0
INSERT 167713 1

I tried this example, but INFO showed 1, not 0.
Yeah ... the INSERT won't show an OID by default anymore, either.
Fixed; thanks for the report!

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend


Reply With Quote
  #3  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] BUG #2096: bug in a SPI sample document - 03-02-2006 , 10:18 PM




This documentation bug has been fixed. We currently have:

=> SELECT * FROM a;
x
---
1 -- no rows in a (0) + 1
(1 row)

=> INSERT INTO a VALUES (execq('SELECT * FROM a', 0) + 1);
INFO: EXECQ: 1
INSERT 0 1

Is the "INSERT 0 1" right? I see an oid in your example, but that might
be because we no longer user oids by default.

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

Yoshihisa Nakano wrote:
Quote:
The following bug has been logged online:

Bug reference: 2096
Logged by: Yoshihisa Nakano
Email address: nakano.yosihisa (AT) jp (DOT) fujitsu.com
PostgreSQL version: 8.1.0
Operating system: RedHat Enterprise Linux ES 3.0
Description: bug in a SPI sample document
Details:

There is a difference between the result of the SPI
example in the doc and the actual result of that.


Doc 40.5 Examples
=> SELECT * FROM a;
x
---
1 -- no rows in a (0) + 1
(1 row)

=> INSERT INTO a VALUES (execq('SELECT * FROM a', 0) + 1);
INFO: EXECQ: 0
INSERT 167713 1


I tried this example, but INFO showed 1, not 0. I
think the value of INFO in doc is wrong, because the
value of row is 1 at this time.

This bug seems to exist also in 7.3.x, 7.4.x and 8.0.x.

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

--
Bruce Momjian http://candle.pha.pa.us
SRA OSS, Inc. http://www.sraoss.com

+ If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match


Reply With Quote
  #4  
Old   
NAKANO Yoshihisa
 
Posts: n/a

Default Re: [BUGS] BUG #2096: bug in a SPI sample document - 03-04-2006 , 03:28 PM



Bruce Momjian wrote:
Quote:
This documentation bug has been fixed. We currently have:

=> SELECT * FROM a;
x
---
1 -- no rows in a (0) + 1
(1 row)

=> INSERT INTO a VALUES (execq('SELECT * FROM a', 0) + 1);
INFO: EXECQ: 1
INSERT 0 1

Is the "INSERT 0 1" right? I see an oid in your example, but that might
be because we no longer user oids by default.
Yes. IIRC, Tom had already pointed out that and fixed.

http://archives.postgresql.org/pgsql...2/msg00071.php

Regards,
Yoshihisa Nakano


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

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


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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.