pgloader version "3.6.7~devel"
compiled with SBCL 2.1.1.debian
[x] did you test a fresh compile from the source tree?
~Unfortunately I can't, because building on an ARM Mac does not seem to be supported.
Installing clozure-cl already fails with: clozure-cl: The x86_64 architecture is required for this software.~
Using a docker build worked, but produces the same result.
[x] did you search for other similar issues?
[x] how can I reproduce the bug?
Incude a self-contained pgloader command file.
If you're loading from a database, consider attaching a database dump to
your issue. For MySQL, use mysqldump. For SQLite, just send over your
source file, that's easy. Maybe be the one with your production data, of
course, the one with just the sample of data that allows me to reproduce
your bug.
When using a proprietary database system as a source, consider creating
a sample database on some Cloud service or somewhere you can then give
me access to, and see my email address on my GitHub profile to send me
the credentials. Still open a public issue for tracking and as
documentation for other users.
LOAD CSV
FROM INLINE with encoding 'ascii'
INTO postgresql:///pgloader
TARGET TABLE jordane
WITH truncate,
fields terminated by '|',
fields not enclosed,
fields escaped by backslash-quote
SET work_mem to '128MB',
standard_conforming_strings to 'on'
BEFORE LOAD DO
$$ drop table if exists jordane; $$,
$$ CREATE TABLE jordane
(
"NOM" character(20),
"PRENOM" character(20)
)
$$
AFTER LOAD EXECUTE 'my_script.sql';
BORDET|Jordane
BORDET|Audrey
LASTNAME|"opening quote
BONNIER|testprenombe~aucouptroplong
JOURDAIN|héhé¶
Contents of my_script.sql:
DO $$
BEGIN
EXECUTE 'select 1;';
END;
$$;
[x] pgloader output you obtain
2024-05-29T10:58:36.049000Z LOG pgloader version "3.6.7~devel"
2024-05-29T10:58:36.054000Z LOG Parsing commands from file #P"/work/DBMigrate.load"
KABOOM!
END-OF-FILE: end of file on #<dynamic-extent STRING-INPUT-STREAM (unavailable) from "DO $$
BE...">
An unhandled error condition has been signalled:
end of file on #<dynamic-extent STRING-INPUT-STREAM (unavailable) from "DO $$
BE...">
What I am doing here?
end of file on #<dynamic-extent STRING-INPUT-STREAM (unavailable) from "DO $$
BE...">
[ ] data that is being loaded, if relevant
[ ] How the data is different from what you expected, if relevant
I just noticed, that the DO block isn't the problem. It seems the EXECUTE is the actual trigger here.
I'm not sure what exactly the underlying issue is, but #945 fixes it!
[x] pgloader --version
[x] did you test a fresh compile from the source tree? ~Unfortunately I can't, because building on an ARM Mac does not seem to be supported. Installing
clozure-cl
already fails with:clozure-cl: The x86_64 architecture is required for this software.
~ Using a docker build worked, but produces the same result.[x] did you search for other similar issues?
[x] how can I reproduce the bug?
Incude a self-contained pgloader command file.
If you're loading from a database, consider attaching a database dump to your issue. For MySQL, use
mysqldump
. For SQLite, just send over your source file, that's easy. Maybe be the one with your production data, of course, the one with just the sample of data that allows me to reproduce your bug.When using a proprietary database system as a source, consider creating a sample database on some Cloud service or somewhere you can then give me access to, and see my email address on my GitHub profile to send me the credentials. Still open a public issue for tracking and as documentation for other users.
Contents of
my_script.sql
:[ ] data that is being loaded, if relevant
[ ] How the data is different from what you expected, if relevant