Fix for SQLStatistics
Attached is a small patch to SQLStatistics() to allow proper information
about CLUSTER and HASH indexes, as proposed by the ODBC code. Right now
the CLUSTER information is not maintained, but the HASH is accurate.
Also, I found that the tests for UNIQUE and CLUSTER were done using
atoi(). I don't think that works because these queries return 't' or
'f', not 1 or 0.
Can someone confirm I have have the t/f and 1/0 stuff correct, and can
someone test a HASH index to see that it displays properly? I don't
know how to call SQLStatistics.
Thanks.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Attachments:
/bjm/difftext/plainDownload+57-27
Bruce Momjian wrote:
Attached is a small patch to SQLStatistics() to allow proper information
about CLUSTER and HASH indexes, as proposed by the ODBC code. Right now
the CLUSTER information is not maintained, but the HASH is accurate.
Also, I found that the tests for UNIQUE and CLUSTER were done using
atoi(). I don't think that works because these queries return 't' or
'f', not 1 or 0.
Psqlodbc driver automatically coverts t/f to 1/0.
regards,
Hiroshi Inoue
[ Charset US-ASCII unsupported, converting... ]
Bruce Momjian wrote:
Attached is a small patch to SQLStatistics() to allow proper information
about CLUSTER and HASH indexes, as proposed by the ODBC code. Right now
the CLUSTER information is not maintained, but the HASH is accurate.
Also, I found that the tests for UNIQUE and CLUSTER were done using
atoi(). I don't think that works because these queries return 't' or
'f', not 1 or 0.Psqlodbc driver automatically coverts t/f to 1/0.
How does it know when to do the conversion? Is there something that
flags is as a boolean?
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
[ Charset US-ASCII unsupported, converting... ]
Bruce Momjian wrote:
Attached is a small patch to SQLStatistics() to allow proper information
about CLUSTER and HASH indexes, as proposed by the ODBC code. Right now
the CLUSTER information is not maintained, but the HASH is accurate.
Also, I found that the tests for UNIQUE and CLUSTER were done using
atoi(). I don't think that works because these queries return 't' or
'f', not 1 or 0.Psqlodbc driver automatically coverts t/f to 1/0.
How does it know when to do the conversion? Is there something that
flags is as a boolean?
I think I see how it is done. Fixing patch now.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
OK, here is a new version of the patch, with the true/false stuff fixed.
[ Charset US-ASCII unsupported, converting... ]
Bruce Momjian wrote:
Attached is a small patch to SQLStatistics() to allow proper information
about CLUSTER and HASH indexes, as proposed by the ODBC code. Right now
the CLUSTER information is not maintained, but the HASH is accurate.
Also, I found that the tests for UNIQUE and CLUSTER were done using
atoi(). I don't think that works because these queries return 't' or
'f', not 1 or 0.Psqlodbc driver automatically coverts t/f to 1/0.
regards,
Hiroshi Inoue
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026