X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 04E4CD6D04 for ; Mon, 22 Aug 2005 01:24:14 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 22692-08 for ; Mon, 22 Aug 2005 04:24:09 +0000 (GMT) Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.116.145.2]) by svr1.postgresql.org (Postfix) with ESMTP id 66ED1D6E23 for ; Mon, 22 Aug 2005 01:24:09 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id F41CD30B42; Mon, 22 Aug 2005 06:36:01 +0200 (MET DST) From: "Jeff Eckermann" X-Newsgroups: pgsql.interfaces.odbc Subject: Re: Unexpected ADO properties Date: Mon, 22 Aug 2005 13:54:03 +0930 Organization: Hub.Org Networking Services Lines: 92 Message-ID: References: <20050820115339.D2B57834@dm21.mta.everyone.net> X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original To: pgsql-odbc@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=3.363 required=5 tests=[AWL=0.004, FORGED_YAHOO_RCVD=2.174, PRIORITY_NO_NAME=1.185] X-Spam-Level: *** X-Archive-Number: 200508/186 X-Sequence-Number: 5825 "Bernard Henry Voynet" wrote in message news:20050820115339.D2B57834@dm21.mta.everyone.net... > Hello > I am working on a project that access databases through ADO > over ODBC and must now include PostgreSQL. > > The code of this project needs to know about the fields > caracteristics like whether or not it is: > - a primary key > - an autoincrement key > - nullabble > - updatable > - etc.. > > For this I use the ADO properties that give theses > informations. > > For a Jet database I get (for example): > serialkey > Type = adInteger > DefinedSize = 4 > Precision = 10 > NumericScale = 255 > Status = adRecOK > Attributes = adFldFixed > Properties (9) > BASECATALOGNAME (adVarWChar) = (Null) > BASECOLUMNNAME (adVarWChar) = serialkey > BASESCHEMANAME (adVarWChar) = (Null) > BASETABLENAME (adVarWChar) = genericfields > CALCULATIONINFO (adVarBinary) = (Null) > ISAUTOINCREMENT (adBoolean) = True > KEYCOLUMN (adBoolean) = True > OPTIMIZE (adBoolean) = False > RELATIONCONDITIONS (adVarBinary) = (Null) > > However, with PostgreSQL 8.0.3 (psqlodc 08.00.0102), I don't get what > is expected. > > When I declare le serialkey field as as SERIAL PRIMARY KEY, instead of the > expected result, I get: > serialkey > Type = adInteger > DefinedSize = 4 > Precision = 10 > NumericScale = 255 > Status = adRecOK > Attributes = adFldUnknownUpdatable, adFldFixed, adFldIsNullable, > adFldMayBeNull > Properties (9) > BASECATALOGNAME (adVarWChar) = (Null) > BASECOLUMNNAME (adVarWChar) = serialkey > BASESCHEMANAME (adVarWChar) = (Null) > BASETABLENAME (adVarWChar) = genericfields > CALCULATIONINFO (adVarBinary) = (Null) > ISAUTOINCREMENT (adBoolean) = False > KEYCOLUMN (adBoolean) = True > OPTIMIZE (adBoolean) = False > RELATIONCONDITIONS (adVarBinary) = (Null) > > Where both: > - Attributes > - ISAUTOINCREMENT > Are not correct since serialkey is a non nullable serial key PostgreSQL has no notion of "autoincrement". The "serial" type is an equivalent implementation, but is not actually a type in itself; it is an integer type with a default value drawn from a sequence. The values reported in the "attributes" are certainly wrong; this is definitely a bug somewhere, but where, I don't know enough to say. Perhaps someone more knowledgeable can help. > > Would you have any idea on this problem ? > And any help to get the right values ? > > Best regards > > > _____________________________________________________________ > Obtenez aussi votre adresse electronique gratuite de > Quebecemail.com http://www.quebecemail.com, un service gratuit et > permanent. > > ---------------------------(end of broadcast)--------------------------- > TIP 3: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq >