column name order matters in insert into foo from bar - Mailing list pgsql-general

From Grzegorz Jaśkiewicz
Subject column name order matters in insert into foo from bar
Date
Msg-id 2f4958ff0812040515j67112cdejdc54f29365805a46@mail.gmail.com
Whole thread Raw
Responses Re: column name order matters in insert into foo from bar  ("Grzegorz Jaśkiewicz" <gryzman@gmail.com>)
List pgsql-general
hey,

it looks , as if when I have two tables, say
create table foo(
  a int,
  b varchar,
  c float
);

and :

create table bar(
  b varchar,
  a int,
  c float
);

migration of data from one to the other using

insert into foo select * from bar; will fail.
How can I walk around that please ?

--
GJ

pgsql-general by date:

Previous
From: "Grzegorz Jaśkiewicz"
Date:
Subject: Re: psql verbose mode
Next
From: "Grzegorz Jaśkiewicz"
Date:
Subject: Re: column name order matters in insert into foo from bar