column is of type date but expression is of type text
So, I was trying this and it resulted in an error:
It happened when I tried updating multiple columns of multiple rows of a table. It doesn't happen when multiple columns of a single row are being updated. What causes this? I asked another person and they said that it's not necessarily a postgres issue and probably has somethi to do with drizzle orm.
Drizzle ORM - Update many with different values for each row
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
3 Replies
Without seeing the code it's impossible to see if there's something wrong
Both update operations have the same functionality, but in the second case I get
column \"date_of_birth\" is of type date but expression is of type text
error.Try not passing null as parameter
Just write null in the sql operator
Also, try putting an else condition to your case statement