Re: Implicit casts to array types

From: joshua <jzuellig(at)arbormetrix(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Implicit casts to array types
Date: 2012-12-14 16:26:54
Message-ID: 1355502414442-5736610.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane-2 wrote
> COPY is not smart at all. It just looks at the column types of the
> target table and assumes that the incoming data is of those types.
> (More precisely, it applies the input conversion function of each
> column's data type, after having separated and de-escaped the text
> according to datatype-independent format rules.)
>
> In that case, adjusting the source data is the way to go. Or you could
> look at using an external ETL tool to do that for you. We've resisted
> putting much transformational smarts into COPY because the main goal
> for it is to be as fast and reliable as possible.
>
> regards, tom lane

I see, it's that input conversion function that I would have needed to
change.
I understand and agree, we depend on COPY FROM in many contexts to upload
huge batches of data orders of magnitude faster than INSERT. We've also used
it recently as a generic table interface for smaller configuration tables,
but you're right: speed and reliability should be the primary focus of COPY
FROM.
Thanks for all the quick responses, you guys.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Implicit-casts-to-array-types-tp5736582p5736610.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message dmp 2012-12-14 16:30:50 Re: Fwd: [ADMIN] Confuse about the behaveior of PreparedStatement.executeBatch (jdbc)
Previous Message Haifeng Liu 2012-12-14 16:25:23 Re: Fwd: [ADMIN] Confuse about the behaveior of PreparedStatement.executeBatch (jdbc)