Re: CStringGetTextDatum and other conversions in server-side code

From: <david(at)andl(dot)org>
To: <pgsql-general-owner+M220390=david=andl(dot)org(at)postgresql(dot)org>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: CStringGetTextDatum and other conversions in server-side code
Date: 2016-03-03 05:36:34
Message-ID: 007501d1750e$a86db8d0$f9492a70$@andl.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> [dmb>] So how would I go about finding a set of useful conversion functions for basic types (real, decimal, time, etc)?

the basic SQL to C mappings are defined by the H files listed here, http://www.postgresql.org/docs/current/static/xfunc-c.html#XFUNC-C-TYPE-TABLE
[dmb>]
[dmb>] Yes, thanks, I found those. Most useful too. What I was looking for was the preferred set of functions that could be used to convert between those types and native C types (that could be used externally with no Postgres includes).

[dmb>] This is fairly easy for ints and reals, but is particularly a problem for all the variable length types (eg text, time and decimal).

Regards
David M Bennett FACS

Andl - A New Database Language - andl.org

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2016-03-03 06:15:11 Re: CStringGetTextDatum and other conversions in server-side code
Previous Message John R Pierce 2016-03-03 02:05:03 Re: Re: could not migrate 8.0.13 database with large object data to 9.5.1