DBD::Pg (version 3.16.3) returns EMPTY char columns as 'undef'

Поиск
Список
Период
Сортировка
От Matthias Apitz
Тема DBD::Pg (version 3.16.3) returns EMPTY char columns as 'undef'
Дата
Msg-id ZEfKic3n/58EOpoa@pureos
обсуждение исходный текст
Ответы Re: DBD::Pg (version 3.16.3) returns EMPTY char columns as 'undef'  (Ian Lawrence Barwick <barwick@gmail.com>)
Re: DBD::Pg (version 3.16.3) returns EMPTY char columns as 'undef'  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
Список pgsql-general
Hello,

We're using the above DBD::Pg version on Linux together with PostgreSQL 15.1
On fetch empty char columns are returned as (Perl) 'undef'

                  while ( my @row_ary = $dba->FetchArray()) {
                   foreach my $i (0..$#row_ary) {
                                if ($row_ary[$i] eq undef)  {
                                        print $row_ary[1] . "\n";
                                        next;
                                }
                                ...
which later leads in our code to NULL values '\N' in the writing of a CSV-like export
files. Ofc NULL values in the database are something else as '' char
strings. 

How this must be distinguished with DBD::Pg?

Thanks

    matthias


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



В списке pgsql-general по дате отправления:

Предыдущее
От: gzh
Дата:
Сообщение: Re: psql:t_mstr.sql:994: ERROR: function to_char(numeric) does not exist
Следующее
От: Erik Wienhold
Дата:
Сообщение: Re: psql:t_mstr.sql:994: ERROR: function to_char(numeric) does not exist