BUG: Each UNION | EXCEPT | INTERSECT query must have the same number of columns.

Поиск
Список
Период
Сортировка
От Jacek Konieczny
Тема BUG: Each UNION | EXCEPT | INTERSECT query must have the same number of columns.
Дата
Msg-id 20010327193938.A6497@nic.nigdzie
обсуждение исходный текст
Ответы Re: BUG: Each UNION | EXCEPT | INTERSECT query must have the same number of columns.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Your name               : Jacek Konieczny
Your email address      : jajcus@bnet.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...

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Thomas Lockhart
Дата:
Сообщение: Re: [PATCHES] Error in the date field (with NULL value...).Thanks!
Следующее
От: "Fernando Schutz"
Дата:
Сообщение: I can't initialize