Re: [GENERAL] Installing PL/pgSQL by default

2009-12-17 Thread Bruce Momjian
Bruce Momjian wrote: > Tom Lane wrote: > > Bruce Momjian writes: > > > I installed PL/pgSQL by default via initdb with the attached patch. The > > > only problem is that pg_dump still dumps out the language creation: > > > CREATE PROCEDURAL LANGUAGE plpgsql; > > > ALTER PROCEDURAL LANGUAGE pl

Re: [HACKERS] [GENERAL] Installing PL/pgSQL by default

2009-12-12 Thread Dimitri Fontaine
Hi, Le 11 déc. 2009 à 01:43, Bruce Momjian a écrit : >> Would you be up for writing the extension facility? > > Uh, well, I need to help with the patch commit process at this point --- > if I find I have extra time, I could do it. I will keep this in mind. If you ever find the time to do it, t

Re: [GENERAL] Installing PL/pgSQL by default

2009-12-11 Thread Tom Lane
Bruce Momjian writes: > A more difficult issue is whether we should preserve the fact that > plpgsql was _removed_ in the pg_dump output, i.e, if someone removes > plpgsql from a database, do we issue a DROP LANGUAGE in pg_dump? I > don't remember us having to deal with anything like this before.

Re: [GENERAL] Installing PL/pgSQL by default

2009-12-11 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > I installed PL/pgSQL by default via initdb with the attached patch. The > > only problem is that pg_dump still dumps out the language creation: > > CREATE PROCEDURAL LANGUAGE plpgsql; > > ALTER PROCEDURAL LANGUAGE plpgsql OWNER TO postgres; > >

Re: [HACKERS] [GENERAL] Installing PL/pgSQL by default

2009-12-10 Thread Bruce Momjian
Dimitri Fontaine wrote: > Tom Lane writes: > > It's not impossible that we'll have to tweak pg_dump a bit; it's > > never had to deal with languages that shouldn't be dumped ... > > Ah, the best would be to have extensions maybe. Then you could do this > in initdb, filling in template0: > CREAT

Re: [HACKERS] [GENERAL] Installing PL/pgSQL by default

2009-12-10 Thread Dimitri Fontaine
Tom Lane writes: > It's not impossible that we'll have to tweak pg_dump a bit; it's > never had to deal with languages that shouldn't be dumped ... Ah, the best would be to have extensions maybe. Then you could do this in initdb, filling in template0: CREATE EXTENSION plpgsql ...; Then at crea

Re: [GENERAL] Installing PL/pgSQL by default

2009-12-08 Thread Tom Lane
Bruce Momjian writes: > I installed PL/pgSQL by default via initdb with the attached patch. The > only problem is that pg_dump still dumps out the language creation: > CREATE PROCEDURAL LANGUAGE plpgsql; > ALTER PROCEDURAL LANGUAGE plpgsql OWNER TO postgres; > What is odd is that I us

Re: [GENERAL] Installing PL/pgSQL by default

2009-12-08 Thread Bruce Momjian
Tom Lane wrote: > Andrew Dunstan writes: > > Before we go too far with this, I'd like to know how we will handle the > > problems outlined here: > > > > Hm, I think that's only a problem if we define it to be a problem, > and I

Re: [HACKERS] [GENERAL] Installing PL/pgSQL by default

2009-12-07 Thread Dimitri Fontaine
Tom Lane writes: > Why not? If they really want to prohibit use of a feature the upstream > project has decided should be standard, that's their privilege. Well, I guess they could also automate their database creation to fix the privileges and assign the ownership of the language to the owner o

Re: [HACKERS] [GENERAL] Installing PL/pgSQL by default

2009-12-07 Thread Tom Lane
Dimitri Fontaine writes: > So should the decision to remove plpgsql be on the hosting platform > hands or the hosted database owner? Why not? If they really want to prohibit use of a feature the upstream project has decided should be standard, that's their privilege. The argument against seems t

Re: [HACKERS] [GENERAL] Installing PL/pgSQL by default

2009-12-07 Thread Dimitri Fontaine
Tom Lane writes: > Right, just like every other thing that's pre-installed. If a > particular installation wishes to let individual DB owners control this, > the superuser can drop plpgsql from template1. It's not apparent to me > why we need to allow non-superusers to override the project's dec

Re: [HACKERS] [GENERAL] Installing PL/pgSQL by default

2009-12-04 Thread Tom Lane
Andrew Gierth writes: > "Tom" == Tom Lane writes: > Tom> Hm, I think that's only a problem if we define it to be a > Tom> problem, and I'm not sure it's necessary to do so. > The complaint is that if plpgsql is installed by default, then it will > be owned by postgres rather than by the db own

Re: [GENERAL] Installing PL/pgSQL by default

2009-12-04 Thread Alvaro Herrera
Jasen Betts wrote: > On 2009-12-04, Andrew Gierth wrote: > > The complaint is that if plpgsql is installed by default, then it will > > be owned by postgres rather than by the db owner, who will then not be > > able to drop it or use grant/revoke on it. > > The same problem is had with schema pu

Re: [GENERAL] Installing PL/pgSQL by default

2009-12-04 Thread Jasen Betts
On 2009-12-04, Andrew Gierth wrote: >> "Tom" == Tom Lane writes: > > > Andrew Dunstan writes: > >> Before we go too far with this, I'd like to know how we will handle the > >> problems outlined here: > >> > > Tom> Hm, I th

Re: [HACKERS] [GENERAL] Installing PL/pgSQL by default

2009-12-04 Thread Andrew Gierth
> "Tom" == Tom Lane writes: > Andrew Dunstan writes: >> Before we go too far with this, I'd like to know how we will handle the >> problems outlined here: >> Tom> Hm, I think that's only a problem if we define it to

Re: [GENERAL] Installing PL/pgSQL by default

2009-12-03 Thread Tom Lane
Andrew Dunstan writes: > Before we go too far with this, I'd like to know how we will handle the > problems outlined here: > Hm, I think that's only a problem if we define it to be a problem, and I'm not sure it's necessary to

Re: [GENERAL] Installing PL/pgSQL by default

2009-12-03 Thread Bruce Momjian
Andrew Dunstan wrote: > > > Tom Lane wrote: > > Bruce Momjian writes: > > > >> One problem is that because system oids are used, it isn't possible to > >> drop the language: > >> I assume we still want to allow the language to be uninstalled, for > >> security purposes. > >> > > > > Yes.

Re: [GENERAL] Installing PL/pgSQL by default

2009-12-03 Thread Andrew Dunstan
Tom Lane wrote: Bruce Momjian writes: One problem is that because system oids are used, it isn't possible to drop the language: I assume we still want to allow the language to be uninstalled, for security purposes. Yes. That behavior is not acceptable. Why aren't you just adding a

Re: [GENERAL] Installing PL/pgSQL by default

2009-12-03 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > One problem is that because system oids are used, it isn't possible to > > drop the language: > > I assume we still want to allow the language to be uninstalled, for > > security purposes. > > Yes. That behavior is not acceptable. Why aren't you just

Re: [GENERAL] Installing PL/pgSQL by default

2009-12-03 Thread Tom Lane
Bruce Momjian writes: > One problem is that because system oids are used, it isn't possible to > drop the language: > I assume we still want to allow the language to be uninstalled, for > security purposes. Yes. That behavior is not acceptable. Why aren't you just adding a CREATE LANGUAGE call

[GENERAL] Installing PL/pgSQL by default

2009-12-03 Thread Bruce Momjian
Tom Lane wrote: > But actually I thought we had more or less concluded that CREATE OR > REPLACE LANGUAGE would be acceptable (perhaps only if it's given > without any extra args?). Or for that matter there seems to be enough > opinion on the side of just installing plpgsql by default. CINE is > a