Le Tuesday 19 April 2005 04:16, vous avez Ãcrit :
> sizeof(Datum) == sizeof(long) - is that compatible with %d formatting (I'm
> guessing something like vsprintf takes place in elog)? Wouldn't this need
> %ld or %lu?
>
> Sorry if this misses the point, I wasn't clear from original post if the
> se
sizeof(Datum) == sizeof(long) - is that compatible with %d formatting (I'm
guessing something like vsprintf takes place in elog)? Wouldn't this need %ld
or %lu?
Sorry if this misses the point, I wasn't clear from original post if the
segfault was on elog or after it.
Regards, Philip.
On Tue
Olivier Thauvin <[EMAIL PROTECTED]> writes:
> Datum
> header_querytxt(PG_FUNCTION_ARGS)
> {
> elog(NOTICE, "querytxt");
> Datum tag;
> /* converting TEXT value to integer one */
> tag = DirectFunctionCall1(rpmtagvalue, PG_GETARG_TEXT_P(1));
> elog(NOTICE, "querytxt %d", tag);
I hope I am on good list, else point me where I should ask.
I create a C function like this:
CREATE
-- IFUPDATE or REPLACE
FUNCTION rpmquery(rpmheader, INT) RETURNS SETOF TEXT AS
'MODULE_PATHNAME', 'header_query' LANGUAGE C IMMUTABLE STRICT;
(do not take care, code come from the .sql.in)