Re: ERROR: invalid input syntax for integer: "0A000"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "McLaughlin, Michael" <McLaughlinM(at)byui(dot)edu>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: ERROR: invalid input syntax for integer: "0A000"
Date: 2019-10-13 18:31:23
Message-ID: 17943.1570991483@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"McLaughlin, Michael" <McLaughlinM(at)byui(dot)edu> writes:
> Code including test:

> err_num INTEGER;

> err_num := SQLSTATE;

I see no bug here. SQLSTATE's value is not necessarily an integer [1],
so you shouldn't be trying to store it in one.

regards, tom lane

[1] https://www.postgresql.org/docs/current/errcodes-appendix.html

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tomas Vondra 2019-10-13 19:23:40 Re: ERROR: invalid input syntax for integer: "0A000"
Previous Message Tom Lane 2019-10-13 18:26:48 Re: BUG #16045: vacuum_db crash and illegal memory alloc after pg_upgrade from PG11 to PG12