Error: Column does not exist in postgresql for update [duplicate]

In Postgres, double quote stand for identifiers (such as table or column names). Here, you actually want a string literal, so you need single quotes:

UPDATE public.meditech_ar_test4
SET filename="text"
WHERE filename is null;

Some databases (namely, MySQL), tolerate double quotes for string literals, while using other characters for identifiers (in MySQL: backticks). However in that regard Postgres follows the rules of standard SQL, which defines double quotes for identifiers. You should just take the habit of always using single quotes for string literals (most databases do support that).

Leave a Comment