Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Insert/select union bug


  • From: Peter <peter(at)greatnowhere(dot)com>
  • To: pgsql-general(at)postgresql(dot)org
  • Subject: Insert/select union bug
  • Date: Wed, 27 Sep 2006 12:14:44 +0300
  • Message-id: <451A4104(dot)7070800(at)greatnowhere(dot)com>

create table temp(a timestamptz);

insert into temp(a) select NULL; /* this passes */

insert into temp(a) select NULL union select NULL; /* fails:
ERROR: column "a" is of type timestamp with time zone but expression is of type text
*/

I need to insert hundreds of thousands of rows, and insert into ... select union is by far more efficient than multitude of inserts.

Postgres 8.1.3, FreeBSD.

Has this (maybe) been fixed in most recent release?


Peter



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group