Re: Implicit casts to array types - Mailing list pgsql-general

From joshua
Subject Re: Implicit casts to array types
Date
Msg-id 1355502414442-5736610.post@n5.nabble.com
Whole thread Raw
In response to Re: Implicit casts to array types  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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.


pgsql-general by date:

Previous
From: Atri Sharma
Date:
Subject: Re: XML Schema for PostgreSQL database
Next
From: Haifeng Liu
Date:
Subject: Fwd: [JDBC] Fwd: [ADMIN] Confuse about the behaveior of PreparedStatement.executeBatch (jdbc)