in reply to Re: how to get complete information about tables
in thread how to get complete information about tables
almost worked fine...$type_name = %{$dbh->type_info(%{$item}->{TYPE})}->{TYPE_NAME}
I get
when gets DATE or TIME data types.Can't use an undefined value as a HASH reference at that line
On the other hand, I get type=text when expecting type=varchar
What am I missing here?
--------UPDATE----------------
Actually, it was with NUMERIC data types, not DATE nor TIME.
For these, I get TYPE=bytea, instead DATE or TIME.
But, if I change the line to
or$type_name = %{$dbh->type_info(%{$item}->{TYPE})}->{SQL_DATETIME_SUB};
I get NULL values.$type_name = %{$dbh->type_info(%{$item}->{TYPE})}->{SQL_DATA_TYPE};
From the DBD::Pg documentation, I read "Information is only provided for SQL datatypes and for frequently used datatypes."
Question: are DATE and TIME so infrequently used datatypes like that?
Isn't there any better way to get all information about DB tables?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: how to get complete information about tables
by insaniac (Friar) on Dec 08, 2004 at 08:12 UTC |