A couple binary cursor questions
I am writing an ODBC driver for PostgreSQL.
I am using binary cursors. For most data types, I have no problems, but
for a couple I am confused. If someone could point me to the proper
documentation, source file or whatever, I would very much appreciate it.
The types I am having problems with are:
1. Currency data type. The binary pointer to the object, I assumed,
would point to either a NumericVar type (from Numeric.c) or to a Numeric
pointer from numeric.h. Neither of those assumptions are correct, as I
have looked carefully while tracing in the debugger.
So please, where do I find the correct definition for the binary object
handed back from Libpq when using a binary cursor with numeric data
type?
2. Array type objects. I cannot find a description of how to decipher
array objects from a binary cursor. Where can I find a definition of
how to do this.
I apologize for the intrusion, but I have been agonizing over this for
several days.
"Dann Corbit" <DCorbit@connx.com> writes:
The types I am having problems with are:
1. Currency data type.
If you mean type MONEY, it's just an int4. (There's a reason why it's
deprecated...)
2. Array type objects.
See src/include/utils/array.h
regards, tom lane
-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Friday, February 01, 2002 12:08 PM
To: Dann Corbit
Cc: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] A couple binary cursor questions
"Dann Corbit" <DCorbit@connx.com> writes:
The types I am having problems with are:
1. Currency data type.
If you mean type MONEY, it's just an int4. (There's a reason why it's
deprecated...)
-----------------------------------------------------------------------
Sorry. Brain seizure on my part. I meant NUMERIC data type.
As in numeric with a precision of 800 (big whomping number types)
-----------------------------------------------------------------------
2. Array type objects.
See src/include/utils/array.h
regards, tom lane
Import Notes
Resolved by subject fallback
"Dann Corbit" <DCorbit@connx.com> writes:
Sorry. Brain seizure on my part. I meant NUMERIC data type.
Ah. In that case see src/include/utils/numeric.h, as well as the
comments near the head of src/backend/utils/adt/numeric.c. Briefly,
it's packed BCD floating point...
2. Array type objects.
See src/include/utils/array.h
regards, tom lane