Re: Perl::DBI and TYPE of column - Mailing list pgsql-general

From Matthias Apitz
Subject Re: Perl::DBI and TYPE of column
Date
Msg-id 20200303145138.GA17746@sh4-5.1blu.de
Whole thread Raw
In response to Re: Perl::DBI and TYPE of column  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
El día Dienstag, März 03, 2020 a las 09:36:32 -0500, Tom Lane escribió:

> Matthias Apitz <guru@unixarea.de> writes:
> > During unload trailing blanks in all columns are discarded, because they
> > would cause problems during loading for INT and DATE columns.
> 
> Really?
> 
> regression=# select '123  '::int;
>  int4 
> ------
>   123
> (1 row)
> 
> regression=# select '12-02-2019  '::date;
>     date    
> ------------
>  2019-12-02
> (1 row)

The problem occurs when loading CSV data like ...|    |... into an INT
column with COPY. I could make you an exact example.

But this wasn't my question, my question is where the document is.

    matthias

-- 
Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Perl::DBI and TYPE of column
Next
From: Adrian Klaver
Date:
Subject: Re: Perl::DBI and TYPE of column