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

From jam paydavousi
Subject Re: BUG #17498: Receive Failed: (error code 1) when importing any csv file from pgAdmin with no explanations
Date
Msg-id 486668902.1716304.1653519567116@mail.yahoo.com
Whole thread Raw
In response to Re: BUG #17498: Receive Failed: (error code 1) when importing any csv file from pgAdmin with no explanations  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-bugs
Great point!  Thanks again

Jam

On Wednesday, May 25, 2022, 03:15:09 PM PDT, David G. Johnston <david.g.johnston@gmail.com> wrote:


On Wed, May 25, 2022 at 3:04 PM jam paydavousi <jampaydavousi@yahoo.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.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #17495: Regression in 15beta1 when filtering subquery including row_number window function
Next
From: Richard Guo
Date:
Subject: Re: BUG #17495: Regression in 15beta1 when filtering subquery including row_number window function