Re: CStringGetTextDatum and other conversions in server-side code - Mailing list pgsql-general

From
Subject Re: CStringGetTextDatum and other conversions in server-side code
Date
Msg-id 007501d1750e$a86db8d0$f9492a70$@andl.org
Whole thread Raw
In response to Re: CStringGetTextDatum and other conversions in server-side code  (John R Pierce <pierce@hogranch.com>)
Responses Re: CStringGetTextDatum and other conversions in server-side code  (John R Pierce <pierce@hogranch.com>)
List 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
couldbe 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







pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: Re: could not migrate 8.0.13 database with large object data to 9.5.1
Next
From: John R Pierce
Date:
Subject: Re: CStringGetTextDatum and other conversions in server-side code