Re: psql default language
От | Iker Arizmendi |
---|---|
Тема | Re: psql default language |
Дата | |
Msg-id | 20030130174347.62c5aa89.iker@research.att.com обсуждение исходный текст |
Ответ на | Re: psql default language (Oliver Vecernik <vecernik@aon.at>) |
Ответы |
Re: psql default language
|
Список | pgsql-general |
I'd like to run scripts with \i from psql and would like to be able to use conditional statements (and other PL niceness). Eg, IF (EXISTS(SELECT 1 FROM pg_type WHERE typname = 'mytype')) THEN DROP TYPE mytype; END IF; (Granted, in this example, you can just drop the type and ignore the warning, but I still think a conditional check is cleaner). This has been discussed on the list before and IIRC, the suggestion was to write PL/pgsql functions to do what you want but I was wondering if 7.3.x had been changed to allow this. Iker On Thu, 30 Jan 2003 23:29:23 +0100 Oliver Vecernik <vecernik@aon.at> wrote: > Iker Arizmendi schrieb: > > >Can postgres/psql be configured to allow PL/pgsql at the prompt? > > > What exactly do you want to do? > > Oliver > > -- > VECERNIK Datenerfassungssysteme > A-2560 Hernstein, Hofkogelgasse 17 > Tel.: +43 2633 47530, Fax: DW 50 > http://members.aon.at/vecernik > > > -- Iker Arizmendi AT&T Labs - Research Speech and Image Processing Lab e: iker@research.att.com w: http://research.att.com p: 973-360-8516
В списке pgsql-general по дате отправления: