Re: returning modified input from C functions - Mailing list pgsql-hackers

From strk
Subject Re: returning modified input from C functions
Date
Msg-id 20040824065000.GA98859@freek.keybit.net
Whole thread Raw
In response to Re: returning modified input from C functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: returning modified input from C functions  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Aug 23, 2004 at 03:20:09PM -0400, Tom Lane wrote:
> strk <strk@keybit.net> writes:
> > Is returning a pointer to the input safe in every case ?
> 
> You mean for returning *unmodified* input, don't you?
> 
> Yes, that's safe.  Scribbling on input values is definitely never safe.
> 
>             regards, tom lane

I meant scribbling actually.
Would PG_DETOAST_DATUM_COPY() make it safe then ?

--strk;



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: 8.0 beta 1 on linux-mipsel R5900
Next
From: "Simon Riggs"
Date:
Subject: Re: PITR: XLog File compression on Archive