pgloader icon indicating copy to clipboard operation
pgloader copied to clipboard

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

Open allenleung86 opened this issue 5 years ago • 2 comments

  • [x] pgloader --version

    pgloader version "3.4.1"
    compiled with SBCL 1.3.3.debian
    
  • [ ] did you test a fresh compile from the source tree?

    Compiling pgloader from sources is documented in the README, it's easy to do, and if patches are to be made to fix your bug, you're going to have to build from sources to get the fix anyway…

  • [x] did you search for other similar issues?

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

allenleung86 avatar Sep 11 '20 08:09 allenleung86

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.

dimitri avatar Oct 19 '20 15:10 dimitri

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

Hakkai94 avatar Nov 05 '24 14:11 Hakkai94