1

I'm trying to update a field so i can test liquibase's functioning on my job. I'm using this syntax

 UPDATE "Country" SET "name" = 'Perúpe' WHERE "id" = 10;

But it will throw an error that says:

Caused by: org.postgresql.util.PSQLException: ERROR: column "Perúpe" does not exist

Which is not a column, it is a value that i'm trying to input so i know liquibase is working.

It is working with a db that was done outside liquibase, and it has only 3 liquibase inputs. Those are ok. When i try to enter a new one, it will crash and stop the app, until i erase that test.

I think my syntax could be wrong. It moved from the table (relation does not exist) to the value of my entry. What could i be doing wrong?

  • 1
    You are right somewhere your Syntax is incorrect. Please provide the rest of you liquibase Skript. As far as I know Liquibase always works in change sets. Without the entire syntax of your change set it will be hard to spot your syntax error. – GJohannes Apr 13 '22 at 19:13
  • 2
    This type of error arises when a string value is passed in as `"Perúpe"` instead of `'Perúpe'`, double quoted strings being taken a identifiers not literal strings. Are you dynamically building the query? – Adrian Klaver Apr 13 '22 at 23:22

1 Answers1

0

This has been asked and answered previously. Error: Column does not exist in postgresql for update

As Adrian wrote in their comment above, using single quotes instead of double quotes is the reported solution.

tabbyfoo
  • 355
  • 1
  • 8