From: soni de <soni.de@gmail.com>
To: Ansgar -59cobalt- Wiechers <lists@planetcobalt.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Regarding COPY command from Postgres 8.2.0
Date: Tue, 18 Sep 2007 10:01:46 +0530
Message-ID: <9f2e40a90709172131g26d681a1pf030910a1793f791@mail.gmail.com> (raw)
In-Reply-To: <20070914120321.GA2615@mail.planetcobalt.net>
References: <9f2e40a90709140321l11e6cdb5g91d8f8bf0a43fd01@mail.gmail.com>
<20070914120321.GA2615@mail.planetcobalt.net>
We have upgraded postgres from 7.2.4 to 8.2.0.
We have program which executes COPY command and our new database is changed
having some extra columns in some tables.
Because of this, COPY commands are failing.
So, we wanted the option to COPY the data without specifying column names.
Thanks,
Sonal
On 9/14/07, Ansgar -59cobalt- Wiechers <lists@planetcobalt.net> wrote:
>
> On 2007-09-14 soni de wrote:
> > In Postgres 7.2.4, COPY command is working fine even if tables have 6
> > fields but we are copying only 5 fields from the file
> >
> > But in Postgres 8.2.0, if table has 6 fields and we need to copy data
> > for 5 fields only, then we need to specify the column names too in
> > COPY command.
> >
> > Is there any configurable option, so that without specifying column
> > name in COPY command we can copy records in table as happened in
> > Postgres 7.2.4?
>
> I don't know if it is possible, but even if it were I'd strongly
> recommend against it, as you'd be relying on the order the columns were
> created in. That's a rather bad idea IMHO. Why would you want to avoid
> giving the names of the columns in the first place?
>
> Regards
> Ansgar Wiechers
> --
> "The Mac OS X kernel should never panic because, when it does, it
> seriously inconveniences the user."
> --http://developer.apple.com/technotes/tn2004/tn2118.html
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: soni.de@gmail.com, lists@planetcobalt.net
Subject: Re: Regarding COPY command from Postgres 8.2.0
In-Reply-To: <9f2e40a90709172131g26d681a1pf030910a1793f791@mail.gmail.com>
References: <9f2e40a90709140321l11e6cdb5g91d8f8bf0a43fd01@mail.gmail.com> <20070914120321.GA2615@mail.planetcobalt.net> <9f2e40a90709172131g26d681a1pf030910a1793f791@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox