DBD::Pg
Honza Pazdziora
adelton na fi.muni.cz
Čtvrtek Únor 21 16:37:40 MET 2002
On Thu, 21 Feb 2002 15:33:48 GMT, Vladimir Makovsky <xmakovsk na fi.muni.cz> wrote:
>
> potrebuji zjistit v databazi nad Postgresem, v kterych sloupcich tabulky
> musi byt nenulove hodnoty:
>
> use DBD::Pg;
>
> &connectdb;
> $tab=zak;
> $query = $dbh->prepare("select * from $tab where (1 = 0)");
> $query->execute;
> $nfields = $query->{NUM_OF_FIELDS};
> for ($i = 0; $i < $nfields; $i++) {
> print $query->{NULLABLE}->[$i];
> }
>
>
> vzdy mi vrati hodnotu 2=nezna. Zajima me jestli to ovladac neumi (v tom
> pripade
> da se to nejak zjistit?), nebo je chyba na me strane.
V dokumentaci DBD::Pg se pise, ze atribut NULLABLE neni driverem
dostupny, ale ze by melo fungovat zjisteni pres func.
--
------------------------------------------------------------------------
Honza Pazdziora | adelton na fi.muni.cz | http://www.fi.muni.cz/~adelton/
.project: Perl, mod_perl, DBI, Oracle, auth. WWW servers, XML/XSL, ...
------------------------------------------------------------------------
Další informace o konferenci Perl