I've done it but I had no results... strange.
I've a 8.3 version and this lines are NOT in the file:
00668 /* varlena.c */
00669 extern text *cstring_to_text(const char *s);
00670 extern text *cstring_to_text_with_len(const char *s, int len);
00671 extern char *text_to_cstring(const text *t);
00672 extern void text_to_cstring_buffer(const text *src, char *dst, size_t dst_len);
00673
00674 #define CStringGetTextDatum(s) PointerGetDatum(cstring_to_text(s))
00675 #define TextDatumGetCString(d) text_to_cstring((text *) DatumGetPointer(d))
Le mercredi 21 octobre 2009 à 12:28 -0400, Andrew Dunstan a écrit :
>
> Samuel ROZE wrote:
> > Le mercredi 21 octobre 2009 à 11:42 -0400, Tom Lane a écrit :
> >
> >> CStringGetTextDatum
> >>
> >
> > Can you give me more precisions ?
> >
> > I'm creating a "user C function", with shared library and
> > CStringGetTextDatum is in "varlena.h" file which is not in the
> > "src/include" dir... How can I include it ?
> >
> >
> >
>
> It's in utils/builtins.h, as a simple grep search should have told you.
>
> cheers
>
> andrew