dbTalk Databases Forums  

[BUGS] BUG #1796: UNION ALL of NULL <=> type = text so mimack pb

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


Discuss [BUGS] BUG #1796: UNION ALL of NULL <=> type = text so mimack pb in the mailing.database.pgsql-bugs forum.



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

Default [BUGS] BUG #1796: UNION ALL of NULL <=> type = text so mimack pb - 07-28-2005 , 08:18 AM







The following bug has been logged online:

Bug reference: 1796
Logged by: Mansion
Email address: michael.mansion (AT) u-picardie (DOT) fr
PostgreSQL version: 8.0.3
Operating system: windows XP
Description: UNION ALL of NULL <=> type = text so mimack pb
Details:

on the table rien with the column "ordre" (int type)
When i write :
INSERT INTO rien (ordre) SELECT NULL UNION ALL SELECT NULL
i have the error :
column "ordre" is of type integer but expression is of type text

Thanks in advance michael From France

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

Reply With Quote
  #2  
Old   
Michael Fuhr
 
Posts: n/a

Default Re: [BUGS] BUG #1796: UNION ALL of NULL <=> type = text so mimack pb - 07-28-2005 , 09:04 AM






On Thu, Jul 28, 2005 at 02:05:30PM +0100, Mansion wrote:
Quote:
on the table rien with the column "ordre" (int type)
When i write :
INSERT INTO rien (ordre) SELECT NULL UNION ALL SELECT NULL
i have the error :
column "ordre" is of type integer but expression is of type text
The complete error message gives a hint about how to solve this problem:

CREATE TABLE rien (ordre integer);
INSERT INTO rien (ordre) SELECT NULL UNION ALL SELECT NULL;
ERROR: column "ordre" is of type integer but expression is of type text
HINT: You will need to rewrite or cast the expression.

For more information see "UNION, CASE, and ARRAY Type Resolution"
in the documentation:

http://www.postgresql.org/docs/8.0/s...nion-case.html

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

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


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.