Re: Updating column on row update

Поиск
Список
Период
Сортировка
От Thom Brown
Тема Re: Updating column on row update
Дата
Msg-id bddc86150911221310p5cf46127pa80b5c435f521e1b@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Updating column on row update  (Scott Marlowe <scott.marlowe@gmail.com>)
Ответы Re: Updating column on row update
Список pgsql-general
2009/11/22 Scott Marlowe <scott.marlowe@gmail.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

В списке pgsql-general по дате отправления:

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: Updating column on row update
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Updating column on row update