dimitri / pgloader

Migrate to PostgreSQL in a single command!
http://pgloader.io
Other
5.45k stars 548 forks source link

How to load csv data which include postgresql function with pgloader? #1208

Open allenleung86 opened 4 years ago

allenleung86 commented 4 years ago

Hello,everyone,my question is,how to load csv data which include postgresql function with pgloader? Thanks! because of some reason, i have to put the function in csv to run

dimitri commented 4 years ago

Hi @allenleung86 ; I don't understand what you want to achieve here.

Please show me an example of the CSV file you have, and the matching data you want to see in Postgres. If it's not entirely obvious what happens between reading the CSV and writing something in Postgres, please detail the steps you are expected to be happening.

Hakkai94 commented 2 weeks ago

Hello, I think I have the same case here : I want to convert a data using a PG function. Source database : MSSQL Source type : varbinary(max) Dest type : oid

How can I convert "myfield" column to same field in PG using a function : lo_from_bytea(0,myfield) ?

For the moment, I've been able to do this using a pre and post statement, but I would be nice if I could do this on-the-fly. Thanks