From: Matthias Apitz <guru@unixarea.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Perl::DBI and TYPE of column
Date: Tue, 3 Mar 2020 15:51:38 +0100
Message-ID: <20200303145138.GA17746@sh4-5.1blu.de> (raw)
In-Reply-To: <32382.1583246192@sss.pgh.pa.us>
References: <20200303140225.GA26410@sh4-5.1blu.de>
<32382.1583246192@sss.pgh.pa.us>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: guru@unixarea.de, tgl@sss.pgh.pa.us
Subject: Re: Perl::DBI and TYPE of column
In-Reply-To: <20200303145138.GA17746@sh4-5.1blu.de>
References: <20200303140225.GA26410@sh4-5.1blu.de> <32382.1583246192@sss.pgh.pa.us> <20200303145138.GA17746@sh4-5.1blu.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox