psql default language

Started by Iker Arizmendiabout 23 years ago4 messagesgeneral
Jump to latest
#1Iker Arizmendi
iker@research.att.com

Can postgres/psql be configured to allow PL/pgsql at the prompt?

Thanks,
Iker

#2Oliver Vecernik
vecernik@aon.at
In reply to: Iker Arizmendi (#1)
Re: psql default language

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

#3Iker Arizmendi
iker@research.att.com
In reply to: Oliver Vecernik (#2)
Re: psql default language

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

#4Neil Conway
neilc@samurai.com
In reply to: Iker Arizmendi (#3)
Re: psql default language

On Thu, 2003-01-30 at 17:43, Iker Arizmendi wrote:

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.

No, it hasn't.

Cheers,

Neil
--
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC