Re: returning modified input from C functions

From: strk <strk(at)keybit(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: returning modified input from C functions
Date: 2004-08-24 06:50:00
Message-ID: 20040824065000.GA98859@freek.keybit.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Aug 23, 2004 at 03:20:09PM -0400, Tom Lane wrote:
> strk <strk(at)keybit(dot)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;

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-08-24 07:18:36 Re: 8.0 beta 1 on linux-mipsel R5900
Previous Message Greg Stark 2004-08-24 06:38:32 Re: 8.0 beta 1 on linux-mipsel R5900