Closed Themanwithoutaplan closed 10 years ago
You're using two cases of column names that the parser didn't know how to deal with: starting with the _
character, double-quoted names. That's now fixed.
Thanks, I was getting there. There's also the simple error of a missing semi-colon at the end of the SET block. This seems to be necessary.
Oh, the whole command itself must terminate with a semicolon, right.
Yeah. That probably needs to go in the docs, right? And it seems to have to be within a block.
Sorry about the column names. Not really a lot I can do about them :-/. Just building the latest version to play with.
Just to be clear: what formatting can/should be used in the INTO block? Double-quotes where Postgres uses them? _
doesn't seem to be special.
Well you can name the CSV fields as you like, the system will not check about anything for the naming, it's up to you. About the case in PostgreSQL... actually I think my patch is shy of a brick load, I don't think the quoting will propagate in the COPY command.
I understand the CSV thing - the fields are just positional placeholders to help the Postgres mapping. Does that mean the quoting has to be mapped?
The mapping doesn't have to be mapped, because the parser generates lisp code that will then UPCASE all symbols internally. The problem you're going to have, I think, is matching the PostgreSQL column names, because I don't recall the CSV code paying attention to needing to quote them.
There, now it should work for you.
My problem was that the file was in UTF-8 with BOM. I changed it to ascii and it was solved
I know there is an issue about errors related to subclauses but I'm not even getting that far. :-( I assume it's a tiny thing but I can't work it out. I've double-checked the columns in the clause using a simple select in Postgres. Are there any special syntax rules for the clauses that we need to be aware of?
This is my script
And this the error:
Encountered at: LOAD CSV FROM 'httpa ^ (Line 1, Column 0, Position 0)