Обсуждение: ECPGttype/OID
<div class="Section1"><p><font face="Times New Roman" size="2"><span style="font-size:10.0pt">Hi *,</span></font><p><fontface="Times New Roman" size="2"><span style="font-size:10.0pt">I’m newbie in PostgreSQL. I’m usingC interface.</span></font><p><font face="Times New Roman" size="2"><span style="font-size:10.0pt">I’m a little confusedregarding type enumerations/defines.</span></font><p><font face="Times New Roman" size="2"><span style="font-size:10.0pt">Thereis set of OID defines in pg_type.h.</span></font><p><font face="Times New Roman" size="2"><spanstyle="font-size:10.0pt">But there is also file ecpgtype.h which contains enumeration ECPGttype.</span></font><p><fontface="Times New Roman" size="2"><span style="font-size:10.0pt">Is there any mapping betweenOID and ECPGttype?</span></font><p><font face="Times New Roman" size="2"><span style="font-size:10.0pt">What are usecasesof those types?</span></font><p><font face="Times New Roman" size="2"><span style="font-size:10.0pt">Thanks</span></font><p><fontface="Times New Roman" size="2"><span style="font-size:10.0pt">----</span></font><p><fontface="Times New Roman" size="2"><span style="font-size:10.0pt">Pawel Hudak</span></font><p><fontface="Times New Roman" size="2"><span style="font-size:10.0pt">e-mail: <a href="mailto:pawel.hudak@nagler-company.com"><fontcolor="black"><span style="color:windowtext">pawel.hudak@nagler-company.com</span></font></a></span></font><pclass="MsoNormal"><font face="TimesNew Roman" size="3"><span style="font-size: 12.0pt"> </span></font></div>
On Tue, Nov 28, 2006 at 11:15:49AM +0100, Pawel Hudak wrote: > I'm a little confused regarding type enumerations/defines. > > There is set of OID defines in pg_type.h. These define the OIDs used in the database itself. > But there is also file ecpgtype.h which contains enumeration ECPGttype. These define the numbers used by ecpg to define its datatypes. > Is there any mapping between OID and ECPGttype? No. Well not really. ECPG does have a few conversion routines it needs internally, but a full fledged mapping doesn't really exist. But then you probably don't need one because the client-server conversation is done in ascii most of the time and ecpg takes care of all the conversions needed. Michael -- Michael Meskes Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!