It generates statements like
- DO
- $$
- BEGIN
- UPDATE network SET name = 'ben' WHERE id = 3;
- IF not found THEN
- INSERT INTO network (id, name) VALUES (3, 'ben');
- END IF;
- END;
- $$
- LANGUAGE plpgsql;
And PSQL 8.4 is throwing when it sees the DO:
org.postgresql.util.PSQLException: ERROR: syntax error at or near “DO”
Has anyone else seen this? Is there a workaround?
I’ve also tried running the SQL generated by updateSQL, and it throws at the same place in psql.
I’m on Liquibase 2.0.
Thanks,
–ben
Guest
2
Hi, I have also the same problem. I’m on Postgres 8.2.
Hi, I did the test and i confirm that it works only with a version of Postgres greater than 9.0. Is there a way to work with Postgres 8.x ?
Thanks.
Created http://forum.liquibase.org/topic/loaddataupdate-doesn-t-work-in-psql-less-than-9-0#49382000000134002 to track the issue.
If anyone has postgres 8.x compatible syntax they think will work, let me know.
Nathan
Guest
5
Hi,
this error happens to me.
CREATE OR REPLACE FUNCTION test() RETURNS integer AS$$DECLARE mtrp RECORD;BEGIN
can anyone help?
PostgreSQL version: 8.3
Liquibase version: 2.0.1
Thanks
Guest
6
hi you wrote this function in sql tag in your change set and use statement.
ex:
CREATE OR REPLACE FUNCTION test()
- RETURNS integer AS
- $$
- DECLARE
- mtrp RECORD;
- BEGIN
/changeSet>