Type table

"ZIGLIO, Frediano, VF-IT" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
Hi,
  I'm writing a small table to keep all type information consistent. Anyone can comment
it? I have some missing informations, some questions and ideas.

missing informations
- how should I fill correctly varint for blobs/variant and other strange types??
"classics" like IMAGE/TEXT (with timestamp and table name) use 4 but SYBLONGCHAR use 5
(only 4 bytes length).
- I don't know SYBVOID, MS UDT and MS XML that much
- some types have different encoding based on usertype (SYBLONGBINARY for instance), how
should I fill ascii/unicode

ideas
- define some "supertype" for conversions?? Supertype should represent a class of types
(ie INT1/INT2/INT4/INT8 -> INT, any DATE/TIME -> DATETIME) so tdsconvert should convert
sybase -> supertype -> sybase ? The idea is to semplify log switches, for instance for
SYBINT2 -> SYBCHAR conversion we could convert SYBINT2 -> INT -> SYBCHAR.

freddy77

_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
freetds_types.txt (text/plain, 2 KB)
Name	vendor	varint	fixed	nullable	variable	blob	numeric	unicode	ascii	
SYB5INT8	SYB	0	0	0	0	0	0	0	0	
SYBBINARY	ALL	1	0	1	1	0	0	0	0	
SYBBIT	ALL	0	1	0	0	0	0	0	0	
SYBBITN	MS	1	0	1	0	0	0	0	0	# Sybase bit is not nullable
SYBBLOB	SYB	??	0	1	1	1	0	Depend	Depend	
SYBBOUNDARY	SYB	1	0	1	1	0	0	0	1	
SYBCHAR	ALL	1	0	1	1	0	0	0	1	
SYBDATE	SYB	0	1	0	0	0	0	0	0	
SYBDATEN	SYB	1	0	1	0	0	0	0	0	
SYBDATETIME	ALL	0	1	0	0	0	0	0	0	
SYBDATETIME4	ALL	0	1	0	0	0	0	0	0	
SYBDATETIMN	ALL	1	0	1	0	0	0	0	0	
SYBDECIMAL	ALL	1	0	1	0	0	1	0	0	
SYBFLT8	ALL	0	1	0	0	0	0	0	0	
SYBFLTN	ALL	1	0	1	0	0	0	0	0	
SYBIMAGE	ALL	4	0	1	1	1	0	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??
XSYBBINARY	MS	2	0	1	1	0	0	0	0
XSYBCHAR	MS	2	0	1	1	0	0	0	1
XSYBNCHAR	MS	2	0	1	1	0	0	1	0
XSYBNVARCHAR	MS	2	0	1	1	0	0	1	0
XSYBVARBINARY	MS	2	0	1	1	0	0	0	0
XSYBVARCHAR	MS	2	0	1	1	0	0	0	1

# XSYBVARCHAR blob se TDS9 ??									
# char if ascii or unicode									
# there are some type that allow size 0 or a constants (SYBDATEN, SYBUNIQUE)
smime.p7s (application/x-pkcs7-signature, 3.1 KB) - not displayed
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.