X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 03B02D1B4C5 for ; Wed, 31 Dec 2003 12:34:24 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 72302-09 for ; Wed, 31 Dec 2003 08:33:37 -0400 (AST) Received: from noon.pghoster.com (noon.pghoster.com [64.246.0.64]) by svr1.postgresql.org (Postfix) with ESMTP id 12E4DD1B43D for ; Wed, 31 Dec 2003 08:33:34 -0400 (AST) Received: from [61.94.48.70] (helo=winxp) by noon.pghoster.com with asmtp (Exim 4.24) id 1AbfXa-0001Br-0M; Wed, 31 Dec 2003 06:33:37 -0600 Message-ID: <00c201c3cf9a$0acf8030$3f285e3d@winxp> From: "Chris Travers" To: "Ashok Chauhan" , References: <1072889593.14188.19.camel@delta.greatindianproducts.com> Subject: Re: data type Date: Wed, 31 Dec 2003 19:31:29 +0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - noon.pghoster.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - travelamericas.com X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/351 X-Sequence-Number: 11857 Hi Ashok; Check the documentation on the system catalogs. You can look up types there, etc. using joins from the system catalogs. Something like SELECT typname FROM pg_types WHERE oid IN (SELECT atttypid FROM pg_attribute WHERE attname = 'column_name' AND attrelid = (SELECT oid FROM pg_class WHERE relname = 'table_name')); Of course that is just off the top of my head, so don't count on it working. Check the developers' docs for the system catalog documentation. Best Wishes, Chris Traver ----- Original Message ----- From: "Ashok Chauhan" To: Sent: Wednesday, December 31, 2003 11:53 PM Subject: [ADMIN] data type > hello > > how i recognize the data type of any field > except \d table_name; > > there is a function of libpq library for recognize field type > but it returns a number not a name of the data type so how i know the > name with the help of this number. > > recv_interger_number = PQftype(resultant_pointer,field_number); > > And this number is same in all versions of postgresql. > suppose:- > in version 7.2 1043 for character & 1083 for varchar so > in version 7.3 is same or not. > > Because my requirement is the data type name in string form not in > number's form. > > plz. help me > thanks > Ashok > > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > >