Re: [pgsql-jdbc] dollar-quoted CREATE FUNCTION statement fails
От | Michael Paesold |
---|---|
Тема | Re: [pgsql-jdbc] dollar-quoted CREATE FUNCTION statement fails |
Дата | |
Msg-id | 4522DA56.4070105@gmx.at обсуждение исходный текст |
Ответ на | Re: [pgsql-jdbc] dollar-quoted CREATE FUNCTION statement fails (Michael Paesold <mpaesold@gmx.at>) |
Ответы |
Re: [pgsql-jdbc] dollar-quoted CREATE FUNCTION statement
|
Список | pgsql-jdbc |
Michael Paesold wrote: > Here is a first version of the patch. It works well for me so far, so > I am asking for comments now. Before everyone forgets about my patch in the discussion about the later patch by Jure Koren... I have already spent some hours on doing research, coding, creating the test case. So I am willing to improve my work, of course. It just much easier with input from the community. I would really welcome any suggestions or criticism. While at it, don't you think that we should handle SQL comments in parseQuery? For example when loading a schema from a file using JDBC, there might be comments in it that will break the current code. Does the JDBC spec say anything about that matter? One other thing that I wanted to try is to not parse the whole query in a single loop, but instead split up the parsing a bit more, in the style of: case '"': scan for next '"'; case '\'': scan for matching '\''; case '$': if dollar-quote, scan for end of dollar-quote It would simplify the other branches of the switch statement and we could get rid of the if (!in... && !in...) stuff, then. Do you think that would be an improvement? Best Regards Michael Paesold
В списке pgsql-jdbc по дате отправления: