Re: Perl::DBI and TYPE of column

From: Matthias Apitz <guru(at)unixarea(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Perl::DBI and TYPE of column
Date: 2020-03-03 14:51:38
Message-ID: 20200303145138.GA17746@sh4-5.1blu.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

El día Dienstag, März 03, 2020 a las 09:36:32 -0500, Tom Lane escribió:

> Matthias Apitz <guru(at)unixarea(dot)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(at)unixarea(dot)de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2020-03-03 16:09:57 Re: Perl::DBI and TYPE of column
Previous Message Tom Lane 2020-03-03 14:36:32 Re: Perl::DBI and TYPE of column