Re: Altering a column if it exists
От | Tom Lane |
---|---|
Тема | Re: Altering a column if it exists |
Дата | |
Msg-id | 19267.1389222385@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Altering a column if it exists (David Johnston <polobo@yahoo.com>) |
Список | pgsql-novice |
David Johnston <polobo@yahoo.com> writes: > Not sure what I was thinking here but the space-issue cannot be right though > the "END" does need a semi-colon to be valid pl/pgsql. Normally after the > semi-colon you would have a newline and then the closing dollar-quotes. > That layout is what I was looking for but mis-translated it into a > white-space error which is obviously wrong since $$somevalue$$ is indeed > valid. I think years ago we required a semicolon after the last END of a plpgsql function body, but we don't anymore. In any case, the error is being thrown before the plpgsql parser ever gets to look at the string, so whether that's true or not isn't the immediate problem. At this point I'm betting the OP is using an old JDBC driver version that doesn't understand dollar-quoted strings, or that there's some layer above it in his client software stack that doesn't understand them (but thinks it knows how to pull apart multi-statement SQL strings). A quick look into the pgsql-jdbc archives says that dollar quote parsing was implemented in 2006, with some bug fixes (for cases this example wouldn't hit) in late 2007. I don't know how that relates to JDBC driver version numbers unfortunately, but certainly anything less than about five years old ought to be OK. regards, tom lane
В списке pgsql-novice по дате отправления: