Search Postgresql Archives

Re: psycopg2.DataError: invalid input syntax for integer: ""

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday, May 6, 2018, tango ward <tangoward15@xxxxxxxxx> wrote:
cur_p.execute("""
                INSERT INTO a_recipient (created, mod, agreed, address, honor,)
                VALUES (%s, %s)""", (current_timestamp, current_timestamp, current_timestamp, '', ''))

That code doesn't even run (extra comma after honor, not enough columns in values).  Provide working code and the definition of a_recipient.

In short, you've passed an empty string to an integer column, which doesn't work.  Supply null or pass a number.

David J.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux