Re: PGXS: REGRESS_OPTS=--load-language=plpgsql

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: David Fetter <david(at)fetter(dot)org>, Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, Euler Taveira de Oliveira <euler(at)timbira(dot)com>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PGXS: REGRESS_OPTS=--load-language=plpgsql
Date: 2010-02-19 19:51:12
Message-ID: 603c8f071002191151i929ccb1rcabfdf9d1d462e19@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Feb 19, 2010 at 2:09 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> David Fetter <david(at)fetter(dot)org> writes:
>> CREATE OR REPLACE LANGUAGE is an even bigger tar pit.
>> http://archives.postgresql.org/pgsql-hackers/2009-10/msg00386.php
>
> The reason that patch got rejected was that it was implementing
> CREATE IF NOT EXISTS --- under a false name.  The problem with
> that is summarized here:
> http://archives.postgresql.org/pgsql-patches/2008-03/msg00416.php
>
> It wouldn't be that hard to implement actual CREATE OR REPLACE
> if we decide that's the most useful solution here.  The code
> would need to be prepared to use heap_update instead of heap_insert,
> and to get rid of old dependencies, but there is plenty of precedent
> for that.
>
> The sticking point for me is still whether or not it's really a good
> idea for pg_dump to be emitting CREATE OR REPLACE LANGUAGE.  It does not
> do that for any other object type.  On the other hand, we've already
> made languages a special case in pg_dump, since it emits the abbreviated
> form of CREATE LANGUAGE in most cases rather than trying to duplicate
> the existing object definition.  Maybe there wouldn't be any bad results
> in practice.

We have all sorts of crufty hacks in pg_dump and the backend to cope
with restoration of older dumps. Compared to some of those, this is
going to be cleaner than newfallen snow. IMHO, anyway.

...Robert

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-02-19 20:01:22 Re: PGXS: REGRESS_OPTS=--load-language=plpgsql
Previous Message Bruce Momjian 2010-02-19 19:48:56 Re: Fast or immediate shutdown