Re: Another issue in default-values patch: defaults expanded too soon

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Another issue in default-values patch: defaults expanded too soon
Date: 2008-12-16 23:45:35
Message-ID: 87bpvbofa8.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> Josh Berkus <josh(at)agliodbs(dot)com> writes:
>
>> That is, I think we should treat changing the defaults the same as we
>> would changing the number and type of parameters; it kicks off a
>> dependency check and requires a CASCADE.
>
> Dream on ... there is no such facility in Postgres and we are not going
> to build one in the 8.4 timeframe.

Well there is this:

postgres=# create or replace function foo (text) returns text as 'select 1' language sql;
ERROR: 42P13: cannot change return type of existing function
HINT: Use DROP FUNCTION first.
LOCATION: ProcedureCreate, pg_proc.c:366

We could say that changing the type of a default argument for a polymorphic
argument isn't allowed just like changing the return value.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's PostGIS support!

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-12-16 23:53:17 Re: Another issue in default-values patch: defaults expanded too soon
Previous Message Tom Lane 2008-12-16 23:38:17 Re: [ADMIN] shared_buffers and shmmax