Re: string_to_array has to be stable?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: string_to_array has to be stable?
Date: 2010-07-29 17:06:03
Message-ID: AANLkTik3mts2opDMGHcZujEhm29Pkx70TSv3cgLfMpFa@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 29, 2010 at 1:00 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> I wrote:
>> BTW, the situation on the input side is a bit different: record_in is
>> volatile because domain_in is, and I think we'd better leave that alone
>> since it's not too hard to believe that a domain might have volatile
>> CHECK expressions.  If we had arrays of domains, anyarray_in would have
>> to be volatile too, but we don't and it isn't.
>
> Oh, wait: we have arrays of composites now, and a composite could
> contain a domain.  So that's wrong too; anyarray_in had better be marked
> volatile.  In general it seems that the coding rules need to be:
>
> * if you depend on an arbitrary type output function, assume it's stable.
>
> * if you depend on an arbitrary type input function, assume it's volatile.
>
> * similarly for binary send/receive functions.
>
> Or we could decide that volatile domain CHECK expressions are un-sensible
> and just relabel all these input functions as stable, which would make
> everything consistent.  Thoughts?

Aren't volatile CHECK expressions pretty un-sensible in general?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vincenzo Romano 2010-07-29 17:08:52 On Scalability
Previous Message Robert Haas 2010-07-29 17:04:55 Re: reducing NUMERIC size for 9.1