Re: BUG #17498: Receive Failed: (error code 1) when importing any csv file from pgAdmin with no explanations

From: jam paydavousi <jampaydavousi(at)yahoo(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #17498: Receive Failed: (error code 1) when importing any csv file from pgAdmin with no explanations
Date: 2022-05-25 22:59:27
Message-ID: 486668902.1716304.1653519567116@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Great point!  Thanks again
Jam
On Wednesday, May 25, 2022, 03:15:09 PM PDT, David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com> wrote:

On Wed, May 25, 2022 at 3:04 PM jam paydavousi <jampaydavousi(at)yahoo(dot)com> wrote:

Never mind I solved the problem. I had to replace 'INT' with 'BIGINT'  forgot 10 digit mobile numbers require 8 bytes.

IMO, and that of most modellers I suspect, the use of a numeric type to represent a non-numeric phone number is the problem.  While phone numbers typically consist of digits they are not numbers - they are identifiers.  In particular, it makes no sense to perform math operations on them.  I'd suggest you use "text" for the data type - add a check constraint if you want to ensure the imported data meets specific criteria.
David J.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Richard Guo 2022-05-26 03:07:27 Re: BUG #17495: Regression in 15beta1 when filtering subquery including row_number window function
Previous Message Tom Lane 2022-05-25 22:39:46 Re: BUG #17495: Regression in 15beta1 when filtering subquery including row_number window function