Thanks Francis.That seems to be a good solution. Thought to use pg_bulkload, a third party library instead of copy, where reject handling can be done in efficient way. Transformation(FILTER) functions can be implemented with any languages in pg_bulkload before it was loaded to table. SQL, C, PLs are ok, but you should write functions as fast as possible because they are called many times. In this case, function should be written in Perl and called inside the Postgressql function. Do you think that will work it out? But pg_bulkload is preferring C function over SQL function for performance. I will try this option as you suggested. Thanks -- View this message in context: http://postgresql.nabble.com/postgres-pg-bulkload-c-filter-function-in-c-programming-tp5936651p5936695.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general