Re: How can I return a pointer to a use structure from a function - Mailing list pgsql-hackers

From Tom Lane
Subject Re: How can I return a pointer to a use structure from a function
Date
Msg-id 11672.1071866467@sss.pgh.pa.us
Whole thread Raw
In response to How can I return a pointer to a use structure from a function  (Chongbing Liu <cliu@cs.nmsu.edu>)
List pgsql-hackers
Chongbing Liu <cliu@cs.nmsu.edu> writes:
> If I want the XXX_in function (for my own data type)
> to return a pointer to a particular structure, what
> micro should I use?

You can just use PG_RETURN_POINTER if you're feeling lazy.
PG_RETURN_TEXT_P and other wrappers around PG_RETURN_POINTER
exist mainly as a simple form of documentation.  If you like
that kind of documentation you can define your own GET and RETURN
macros for your own datatype (look in fmgr.h for examples).
If you don't, don't bother.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Manfred Spraul
Date:
Subject: Re: Issue with Linux+Pentium SMP Context Switching
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Proposed Query Planner TODO items