Check if language is installed - Mailing list pgsql-general

From Andrus
Subject Check if language is installed
Date
Msg-id f6lkd2$2m8d$1@news.hub.org
Whole thread Raw
List pgsql-general
My script running as superuser needs to install plpgsql using

CREATE LANGUAGE plpgsql;


in 8.2+

Which is the best way to check that this command does not cause error ?

Is it best to use

select true from pg_language where lanname='plpgsql'

for checking for plpgsql existance  before running CREATE LANGUAGE ?

Andrus.

pgsql-general by date:

Previous
From: "David F. Johnson"
Date:
Subject: User-Defined Types
Next
From: Carmen Martinez
Date:
Subject: catalog location