Fatal error when not numeric value - PostgreSQL 9.2 - Mailing list pgsql-general

From drum.lucas@gmail.com
Subject Fatal error when not numeric value - PostgreSQL 9.2
Date
Msg-id CAE_gQfWUu0S1Wi1Fxo7dYtisUESRqFRVQTuWV6YCoqi-zuH5zw@mail.gmail.com
Whole thread Raw
Responses Re: Fatal error when not numeric value - PostgreSQL 9.2
List pgsql-general

Hi all,

Below is an example of the auto-generated update query, with client-supplied keys (_iid). There's a fatal error when _iid is not numeric. However; this should accept any value.

Question: How could I do something that would allow _iid to be more than just an INT?

WITH
    in_rows AS (
      SELECT
        CAST(customer_id AS BIGINT),
        csv_data,
        freshbooks_id,
        myob_id,
        ppy_id,
        qb_id,
        xero_id,
        _iid
      FROM
        (
          VALUES
('3905', E'\x1A', E'\x1A', 'c59894c-142b6', E'\x1A', E'\x1A', E'\x1A', '44'),
('39107', E'\x1A', E'\x1A', '6260-2ba1', E'\x1A', E'\x1A', E'\x1A', '65e-0f0d-49b4-9ac1-a8752ba1'),
Thank you
Lucas

pgsql-general by date:

Previous
From: "Rader, David"
Date:
Subject: Re: Postgres 9.5 - password for new windows user
Next
From: "David G. Johnston"
Date:
Subject: Re: Fatal error when not numeric value - PostgreSQL 9.2