Re: Updating column on row update

From: Adrian Klaver <aklaver(at)comcast(dot)net>
To: pgsql-general(at)postgresql(dot)org
Cc: Thom Brown <thombrown(at)gmail(dot)com>, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Subject: Re: Updating column on row update
Date: 2009-11-22 21:20:40
Message-ID: 200911221320.40845.aklaver@comcast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Sunday 22 November 2009 1:10:36 pm Thom Brown wrote:
> 2009/11/22 Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
>
> > > Thanks Scott. It's a shame a function has to be used because it then
> > > has the dependency of plpgsql being loaded. I'm attempting to write a
> >
> > database
> >
> > > schema to accompany a PostgreSQL driver for a popular CMS, but I guess
> > > I could get it to load plpgsql in as a language.
> > > The problem now is if the the schema creation script is run against a
> > > database where the language is already installed, I would get an error
> > > saying it already exists. Is there a way to get it to check for it
> >
> > first,
> >
> > > and only create it if it isn't exist? Bear in mind I'd want this to be
> > > compatible at least as far back as 8.1.
> >
> > Try this:
> >
> > select * from pg_language ;
> >
> > Pretty sure that exists pretty far back.
>
> Yes, I noticed that existed in the catalogs, but how could that be
> incorporated into an installation SQL script? The language constructs I
> imagine I'd need to test that are in plpgsql itself.
>
> Thanks
>
> Thom

As far as I know the language exists ERROR will not stop the rest of the process
from completing. You may in search of solution to a problem that does not
exist :)

--
Adrian Klaver
aklaver(at)comcast(dot)net

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christophe Pettus 2009-11-22 21:27:10 Re: Updating column on row update
Previous Message Thom Brown 2009-11-22 21:10:36 Re: Updating column on row update

Browse pgsql-hackers by date

  From Date Subject
Next Message Christophe Pettus 2009-11-22 21:27:10 Re: Updating column on row update
Previous Message Thom Brown 2009-11-22 21:10:36 Re: Updating column on row update