Re: column name order matters in insert into foo from bar

From: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
To: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: column name order matters in insert into foo from bar
Date: 2008-12-04 13:37:51
Message-ID: 2f4958ff0812040537y511ce4dasa849eb5875c8220b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Dec 4, 2008 at 1:27 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:

> p.s. you can try use stored procedure for generating these statements
yeah, I ended up generating it using:
select array_to_string(ARRAY(select column_name::text FROM
information_schema.columns where table_name='foo'), ',');

This was one time thing anyway, so than simple copy and paste, etc ..

thanks folks.

--
GJ

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2008-12-04 13:41:57 Re: serial
Previous Message Pavel Stehule 2008-12-04 13:27:04 Re: column name order matters in insert into foo from bar