Skip to Content.
Sympa Menu

freetds - [freetds] Type table

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Type table
  • Date: Mon, 15 Sep 2008 10:07:14 +0200

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
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 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 1 0 ?? ??
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)

Attachment: smime.p7s
Description: S/MIME cryptographic signature



  • [freetds] Type table, ZIGLIO, Frediano, VF-IT, 09/15/2008

Archive powered by MHonArc 2.6.24.

Top of Page