Bug Report - alter table does not work on temporary tables - Mailing list pgsql-hackers

From Clark Evans
Subject Bug Report - alter table does not work on temporary tables
Date
Msg-id 37024BD0.D3411D48@manhattanproject.com
Whole thread Raw
List pgsql-hackers
============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name        :    Clark Evans
Your email address    :    clark.evans@manhattanproject.com


System Configuration
---------------------
  Architecture (example: Intel Pentium)      : Pentium

  Operating System (example: Linux 2.0.26 ELF)     : Linux RH 5.2

  PostgreSQL version (example: PostgreSQL-6.4)  : Current CVS version

  Compiler used (example:  gcc 2.8.0)        :


Please enter a FULL description of your problem:
------------------------------------------------

Alter table does not seem to operate on tempoary tables
and does not throw an error.  I would like to be able
to add columns to temp tables to do a cross-tab query.

Please describe a way to repeat the problem.   Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------

clark=> create temp table x ( x text );
CREATE
clark=> insert into x values ( 'x' );
INSERT 270675 1
clark=> select * from x;
x
-
x
(1 row)

clark=> alter table x add column y text;
ADD
clark=> select * from x;
x
-
x
(1 row)

clark=> insert into x values ('a','b');
ERROR: INSERT has more expressions than target columns.


If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------

The only work-around I know is to use arrays.  I'm trying that.
Attachment

pgsql-hackers by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: [HACKERS] Date operations
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Removing derived files from CVS