From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Matthias Apitz <guru@unixarea.de>
To: pgsql-general@lists.postgresql.org
Subject: Re: Perl::DBI and TYPE of column
Date: Tue, 3 Mar 2020 08:09:57 -0800
Message-ID: <889ed99b-a87e-feef-d0ae-9b749f5678f8@aklaver.com> (raw)
In-Reply-To: <20200303140225.GA26410@sh4-5.1blu.de>
References: <20200303140225.GA26410@sh4-5.1blu.de>
On 3/3/20 6:02 AM, Matthias Apitz wrote:
> Hello,
>
> We unload Sybase and Oracle data to migrate the database to PostgreSQL.
> The loading is done very fast with PostgreSQL's COPY command.
>
> During unload trailing blanks in all columns are discarded, because they
> would cause problems during loading for INT and DATE columns. The
> discarding is done like this after fetching the row into the array
> @row_ary:
>
> ...
> # SRP-25024: support for PostgreSQL: we remove on export trailing blanks
> foreach my $i (0..$#row_ary) {
> $row_ary[$i] =~ s/\s+$//;
> # but for CHAR columns we keep one
> # print $dba->{'sth'}->{NAME}->[$i] . " " . $dba->{'sth'}->{TYPE}->[$i] . "\n";
> # it seems that VARCHAR in Sybase is TYPE=1 and in Oracle TYPE=12
> # see also http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36273.1570/html/sprocs/CI...
> # and ftp://sqlstandards.org/SC32/SQL_Registry/
> #
> if ($dba->{'sth'}->{TYPE}->[$i] == 1 || $dba->{'sth'}->{TYPE}->[$i] == 12) {
> $row_ary[$i] =~ s/^$/ /;
> }
> }
>
> My question here is: How I could get a copy of the document
> ftp://sqlstandards.org/SC32/SQL_Registry/
>
> Any copy available here in this list? Thanks
All I could find:
https://grokbase.com/t/perl/dbi-users/074q99ddsn/registry-of-values-for-ansi-x3-135-and-iso-iec-9075...>
> matthias
>
--
Adrian Klaver
adrian.klaver@aklaver.com
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: adrian.klaver@aklaver.com, guru@unixarea.de
Subject: Re: Perl::DBI and TYPE of column
In-Reply-To: <889ed99b-a87e-feef-d0ae-9b749f5678f8@aklaver.com>
References: <20200303140225.GA26410@sh4-5.1blu.de> <889ed99b-a87e-feef-d0ae-9b749f5678f8@aklaver.com>
* 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