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?
In reply to Re^2: how to get complete information about tables
by Miguel
in thread how to get complete information about tables
by Miguel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |