(please do not post HTML to these lists; see:
https://wiki.postgresql.org/wiki/Mailing_Lists)
[dmb>] I checked the list first: it looks like about 25-50% HTML. Happy to 
oblige, but I think you've got your work cut out.

> and looks like it might work. Questions:
> 
> 1.       Is this the right function?
> 2.       Is it OK to use, or are there restrictions?
> 3.       Does it have friends: are there other conversion functions like
> this for other data types (decimal, time in particular)?
> 4.       Is there any particular documentation I can read?

Your best bet is to look at examples. The code in the source tree under contrib 
has many examples, and more specifically src/pl/* should have even more 
relevant examples. Remember, grep is your friend -- get a copy of the source 
tree and try:
[dmb>] 
[dmb>] I have the source tree, I use grep and other tools, and I've read 
thousands of lines of code. There is a great deal of inconsistency, and much of 
the code looks like "Summer of Code", or has been written a number of years ago 
or talks about issues I know have been resolved, or says it's just 'legacy 
support'. The upshot is: I haven't yet been able to figure out the 'right' way 
to do things, or what might go wrong if I choose the 'wrong' way. 

Basically any symbol exported from the postgres backend can be used by your PL. 
There is not a lot of documentation other than in the source code itself. Look 
at 
examples, see what they do, emulate it.
[dmb>] That was my plan. But I do prefer to emulate code that is 'right'.

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

Regards
David M Bennett FACS

Andl - A New Database Language - andl.org







-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to