janek37
janek37

Reputation: 582

Syntax error in a simple UPDATE query

I have this query (PostgreSQL 9.1):

=> update tbp set super_answer = null where packet_id = 18;
ERROR:  syntax error at or near "="

I don't get it. I'm really out of words here.

                Table "public.tbp"
    Column    |          Type          | Modifiers 
--------------+------------------------+-----------
 id           | bigint                 | not null
 super_answer | bigint                 | 
 packet_id    | bigint                 | 

Upvotes: 6

Views: 8163

Answers (1)

janek37
janek37

Reputation: 582

It turned out I've copied some white unicode character and Postgres didn't like it. In a Python console:

>>> u'update "tbp" set "super_answer"=null where "packet_id" = 18'
u'update "tbp" set\xa0"super_answer"=null where "packet_id" = 18'

Life can be strange sometimes.

Upvotes: 14

Related Questions