From: | Jacek Konieczny <jajcus(at)bnet(dot)pl> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG: Each UNION | EXCEPT | INTERSECT query must have the same number of columns. |
Date: | 2001-03-27 17:39:39 |
Message-ID: | 20010327193938.A6497@nic.nigdzie |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Your name : Jacek Konieczny
Your email address : jajcus(at)bnet(dot)pl
System Configuration
---------------------
Architecture (example: Intel Pentium) : AMD K6-II 3DNow
Operating System (example: Linux 2.0.26 ELF) : Linux 2.4.2 ELF (PLD Distribution)
PostgreSQL version (example: PostgreSQL-7.0): PostgreSQL-7.0.3
Compiler used (example: gcc 2.8.0) : probably 2.95.3
Please enter a FULL description of your problem:
------------------------------------------------
When using query with EXCEPT clause in INSERT command sometime
false "ERROR: Each UNION | EXCEPT | INTERSECT query must have the same
number of columns." is generated, and the command fails.
Probably default values are added to the first query before it
is compared to the second one.
Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------
CREATE TABLE tb1 ( a CHARACTER(10) DEFAULT 'abc', b CHARACTER(10));
CREATE TABLE tb2 ( a CHARACTER(10), b CHARACTER(10));
INSERT INTO tb1(b) SELECT b FROM tb2 EXCEPT SELECT b FROM tb1;
If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------
I would have to check the source code...
From | Date | Subject | |
---|---|---|---|
Next Message | Fernando Schutz | 2001-03-27 20:46:29 | I can't initialize |
Previous Message | Stephan Szabo | 2001-03-27 16:29:30 | Re: Bug about 'Foreign Key' |