Re: Meaning of TYPE_NAME in type_info() output

Michael Peppler <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.general,gmane.comp.lang.perl.modules.dbi.sybase
Message-ID <[email protected]>
On Fri, 2005-05-06 at 18:37, Avis, Ed wrote:
> If I make a user-defined type synonym, should the name of this synonym
> appear as TYPE_NAME in the type_info() output or should TYPE_NAME give
> the original SQL type the synonym is defined as?
> 
> Currently if I make a user-defined type on Sybase and use it for some
> column C of a table T, then for 'SELECT C FROM T' DBD::Sybase gives me
> the name of the user type.  I think I would prefer it to give the
> original SQL like 'varchar(10)' in the TYPE_NAME field, but I don't know
> what other DBDs do.

Can you show me an example?

I just tried it, using a user-defined type mapped to varchar(30), and
type_info() returns "char" (which is correct).

DBD::Sybase uses Sybase's sp_datatype_info catalog stored proc to get
the datatype information - this is so that we return the same
information that an ODBC or JDBC driver would get.

Michael
-- 
Michael Peppler  -  [email protected]  -  http://www.peppler.org/
Sybase DBA/Developer
Sybase on Linux FAQ: http://www.peppler.org/FAQ/linux.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.