Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VogfX-0001bm-5D for pgsql-interfaces@arkaria.postgresql.org; Thu, 05 Dec 2013 21:41:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VogfW-0000rm-LJ for pgsql-interfaces@arkaria.postgresql.org; Thu, 05 Dec 2013 21:41:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Voflh-0006uQ-Ba for pgsql-interfaces@postgresql.org; Thu, 05 Dec 2013 20:43:29 +0000 Received: from mail-pb0-x233.google.com ([2607:f8b0:400e:c01::233]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vofle-0007bN-Au for pgsql-interfaces@postgresql.org; Thu, 05 Dec 2013 20:43:29 +0000 Received: by mail-pb0-f51.google.com with SMTP id up15so26519584pbc.24 for ; Thu, 05 Dec 2013 12:43:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:date:message-id :cc:to:mime-version; bh=GLM9qzJdUiB3hx8xZr8ddL4L19l+5oJVAqKkdSmpwzg=; b=ZaTqZ4135dx9wjSVRKZ5SCnXIJQoHbnm9w9zkOvGQlqx77z4+LMs5Kw4FrZ4HiPuSd Ul3rJOACuZqR87MAkflf+lmM62haaF3u9ngHF/F3yTI06hFBRTxCfGLLn6vM+1C3OhzP R2CHMsI2rP1t4Q7hLAoV/tWwVjOZrW4D2RtErghcM0bNn5xSTp2Dx4/zDw49ixHc5nPl lSN0MEvkirrJUWroscCOpBRkRgJlj7Gz1qJVPbhaM3n6a0whnU6TpDUWkfEDGOElJoMn TogZmYxYPbxJGsjzVv7csDBd+GGO78VF0OpEpQpvoNw/gfy0qVrJTN0zGDIG+ON/Ub90 t1JA== X-Received: by 10.68.130.234 with SMTP id oh10mr11512pbb.0.1386276204608; Thu, 05 Dec 2013 12:43:24 -0800 (PST) Received: from [192.168.0.3] ([113.59.191.212]) by mx.google.com with ESMTPSA id ha10sm146740719pbd.17.2013.12.05.12.43.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 05 Dec 2013 12:43:24 -0800 (PST) From: "Hoon H." Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Is it safe to use fundamental type OIDs defined in server/catalog/pg_type.h from client? Date: Fri, 6 Dec 2013 05:43:13 +0900 Message-Id: <69AD5777-82E3-4442-8EB6-DC7395C3D4BD@gmail.com> Cc: "Hoon H." To: pgsql-interfaces@postgresql.org Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) X-Mailer: Apple Mail (2.1510) X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-interfaces Precedence: bulk Sender: pgsql-interfaces-owner@postgresql.org Hello folks. I am writing a C/C++ program which uses `libpq`. I am stuck at getting resu= lt from PQresult because I want to parse text from result automatically by = its type OID value. But it's unclear how I should handle type informations.= =20 What I need is only fundamental built-in types - boolean, int, float, text,= timestamp, binary. Maybe adding some system required system - such as OID = type itself. The problem is OID constant values for built-in types are not = defined in client-side. According to some mailing list entries,=20 http://www.postgresql.org/message-id/20080708000535.GA10491@cuci.nl http://www.postgresql.org/message-id/AANLkTimiNjQa7ws1tyR_W6RQPec6RlxQtWfAC= NMnZ_1P@mail.gmail.com It seems safe to use macros defined in `server/catalog/pg_type.h`, but I st= ill doubt because I couldn't find any official policy on these values.=20 Though I agree people on the mailing list entries, but still this is comple= tely up to dev-team's decision. Can I ask some official policy on these val= ues - OID values for built-in types? If there's some publicly existing policy, please drop me some link. It's to= o hard to find it. --=20 Sent via pgsql-interfaces mailing list (pgsql-interfaces@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-interfaces