Re: [GENERAL] postgres pg_bulkload c filter function in c programming

2016-12-29 Thread rajmhn
Thanks Francis. Meanwhile just gone through usage of perl in postgres function. In turn, this Postgres function can be called in pg_bulkload. I think, this task can be done. Let me give a try. -- View this message in context:

Re: [GENERAL] postgres pg_bulkload c filter function in c programming

2016-12-29 Thread rajmhn
Yes. I can able to apply those mentioned transformation in pgloader & pg_bulkload-SQL filter. Yet to take performance stats. Meanwhile, I'm trying to figure out the other best possible option. We are counting more on performance, error & audit handling. Thanks -- View this message in

Re: [GENERAL] postgres pg_bulkload c filter function in c programming

2016-12-29 Thread Alvaro Herrera
rajmhn wrote: > But, how this can be accomplished when it have 100's of columns from source. > Need to apply transformations only for few columns as mentioned above. Did you try pgloader? See http://pgloader.io/ -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL

Re: [GENERAL] postgres pg_bulkload c filter function in c programming

2016-12-29 Thread Francisco Olarte
On Thu, Dec 29, 2016 at 8:41 PM, rajmhn wrote: > Thanks Francis.That seems to be a good solution. Yep, but not for your problem as ... > > Thought to use pg_bulkload, a third party library instead of copy, where > reject handling can be done in efficient way. Mine was

Re: [GENERAL] postgres pg_bulkload c filter function in c programming

2016-12-29 Thread rajmhn
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

Re: [GENERAL] postgres pg_bulkload c filter function in c programming

2016-12-29 Thread Francisco Olarte
Hi: On Thu, Dec 29, 2016 at 3:01 PM, Jan de Visser wrote: > On Thursday, December 29, 2016 5:10:08 AM EST rajmhn wrote: ... >> I'm new to C. Gone through this documentation. Not clear, how to start. ... > It seems to me it would be much easier to load the data into a

Re: [GENERAL] postgres pg_bulkload c filter function in c programming

2016-12-29 Thread rajmhn
Thanks Jan I'm converting the code from Oracle to Postgres. Both version of code will be available for different users. In Oracle, doing these kind of transformation in SQL loader. Need to follow the same kind of approach in Postgres. SQL filter approach was very easy in terms of coding. From

Re: [GENERAL] postgres pg_bulkload c filter function in c programming

2016-12-29 Thread Jan de Visser
On Thursday, December 29, 2016 5:10:08 AM EST rajmhn wrote: > Gurus, > > Reading the data from file and loading it using pg_bulkload- C filter. As > per documentation, C filter is much faster than SQL filter. > > I'm new to C. Gone through this documentation. Not clear, how to start. >