Re: [HACKERS] Review: Extensions Patch

2010-12-08 Thread David E. Wheeler
On Dec 8, 2010, at 2:07 PM, Dimitri Fontaine wrote: > "David E. Wheeler" writes: >>> And how does the information flows from the Makefile to the production >>> server, already? >> >> `make` generates the file if it doesn't already exist. > > Again, will retry when possible, but it has been a ti

Re: [HACKERS] Review: Extensions Patch

2010-12-08 Thread Dimitri Fontaine
Dimitri Fontaine writes: > Well it does not seem to be complex to code. It's about having a new > property in the control file, relocatable, boolean. This property is > required and controls the behavior of the CREATE EXTENSION ... WITH > SCHEMA command. When true we use the ALTER EXTENSION SET SC

Re: [HACKERS] Review: Extensions Patch

2010-12-08 Thread Dimitri Fontaine
"David E. Wheeler" writes: >> And how does the information flows from the Makefile to the production >> server, already? > > `make` generates the file if it doesn't already exist. Again, will retry when possible, but it has been a time sink once already. -- Dimitri Fontaine http://2ndQuadrant.f

Re: [HACKERS] Review: Extensions Patch

2010-12-08 Thread David E. Wheeler
On Dec 8, 2010, at 1:53 PM, Dimitri Fontaine wrote: >> I don't see why. Most of them are dead simple and could easily be >> Makefile variables. > > And how does the information flows from the Makefile to the production > server, already? `make` generates the file if it doesn't already exist. Da

Re: [HACKERS] Review: Extensions Patch

2010-12-08 Thread Dimitri Fontaine
"David E. Wheeler" writes: > I don't see why. Most of them are dead simple and could easily be > Makefile variables. And how does the information flows from the Makefile to the production server, already? Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation e

Re: [HACKERS] Review: Extensions Patch

2010-12-08 Thread David E. Wheeler
On Dec 8, 2010, at 12:42 PM, Dimitri Fontaine wrote: > Kineticode Billing writes: >> No, it's not. There are no unit tests at all. You can call the contrib >> modules and their tests acceptance tests, but that's not the same >> thing. > > Ok, I need some more guidance here. All contrib extension

Re: [HACKERS] Review: Extensions Patch

2010-12-08 Thread Dimitri Fontaine
Kineticode Billing writes: > No, it's not. There are no unit tests at all. You can call the contrib > modules and their tests acceptance tests, but that's not the same > thing. Ok, I need some more guidance here. All contrib extension (there are 38 of them) are using the CREATE EXTENSION command

Re: [HACKERS] Review: Extensions Patch

2010-12-08 Thread Kineticode Billing
On Dec 8, 2010, at 12:18 PM, Dimitri Fontaine wrote: >> It's certainly true that a large fraction of contrib modules should be >> relocatable in that sense, because they just contain C functions that >> aren't going to care. > > As they all currently are using the SET search_path TO public; trick

Re: [HACKERS] Review: Extensions Patch

2010-12-08 Thread Kineticode Billing
On Dec 8, 2010, at 1:39 AM, Dimitri Fontaine wrote: > "David E. Wheeler" writes: >>> What about unaccent? Or lo (1 domain, 2 functions)? >> >> Sure. Doesn't have to actually do anything. > > Ok, so that's already in the patch :) No, it's not. There are no unit tests at all. You can call the co

Re: [HACKERS] Review: Extensions Patch

2010-12-08 Thread Dimitri Fontaine
Tom Lane writes: > Dimitri's last reply to me > http://archives.postgresql.org/message-id/87r5ds1v4q@hi-media-techno.com > suggests that what he has in mind is to define a relocatable extension > as one that can be relocated ;-), ie it does not contain any such > gotchas. Maybe this is too ug

Re: [HACKERS] Review: Extensions Patch

2010-12-08 Thread Dimitri Fontaine
Robert Haas writes: > Exposing it to the user is what I think is ugly. Ok, and the current idea fixes that! :) > It's also worth noting that ALTER EXTENSION .. SET SCHEMA does NOT > guarantee a correct relocation, because someone might have done ALTER > FUNCTION .. SET search_path = @extschema@,

Re: [HACKERS] Review: Extensions Patch

2010-12-08 Thread Robert Haas
On Wed, Dec 8, 2010 at 12:25 PM, Tom Lane wrote: > Robert Haas writes: >> It's also worth noting that ALTER EXTENSION .. SET SCHEMA does NOT >> guarantee a correct relocation, because someone might have done ALTER >> FUNCTION .. SET search_path = @extschema@, and that's not going to get >> proper

Re: [HACKERS] Review: Extensions Patch

2010-12-08 Thread Tom Lane
Robert Haas writes: > It's also worth noting that ALTER EXTENSION .. SET SCHEMA does NOT > guarantee a correct relocation, because someone might have done ALTER > FUNCTION .. SET search_path = @extschema@, and that's not going to get > properly fixed up. I'm coming to the conclusion more and more

Re: [HACKERS] Review: Extensions Patch

2010-12-08 Thread Robert Haas
On Wed, Dec 8, 2010 at 4:19 AM, Dimitri Fontaine wrote: > Robert Haas writes: >> I think this so-called two-step approach is pretty ugly. > > Well it does not need to be exposed to the user, thinking about it, as > proposed in the other thread. Other than that, you're argument here is > exactly t

Re: [HACKERS] Review: Extensions Patch

2010-12-08 Thread Dimitri Fontaine
Robert Haas writes: > I think this so-called two-step approach is pretty ugly. Well it does not need to be exposed to the user, thinking about it, as proposed in the other thread. Other than that, you're argument here is exactly the same as the ones saying that VACUUM or Hint Bints are bad. It's

Re: [HACKERS] Review: Extensions Patch

2010-12-08 Thread Dimitri Fontaine
"David E. Wheeler" writes: >> What about unaccent? Or lo (1 domain, 2 functions)? > > Sure. Doesn't have to actually do anything. Ok, so that's already in the patch :) >> That's called a shared catalog. I don't see any benefit of having to >> maintain that when we do already have a directory con

Re: [HACKERS] Review: Extensions Patch

2010-12-07 Thread Robert Haas
On Tue, Dec 7, 2010 at 4:29 PM, David E. Wheeler wrote: >>> IOW, if I install extension "foo" and it does *not* have the above >>> magic line, then this command will *not* do what I expect: >>> >>>    CREATE EXTENSION foo WITH SCHEMA bar; >>> >>> Extension "foo" will be in the public schema (usual

Re: [HACKERS] Review: Extensions Patch

2010-12-07 Thread David E. Wheeler
On Dec 7, 2010, at 8:00 AM, Dimitri Fontaine wrote: >> You write a very simple contrib module exclusively for testing. It >> doesn't have to actually do anything other than create a couple of >> objects. A domain perhaps. > > What about unaccent? Or lo (1 domain, 2 functions)? Sure. Doesn't have

Re: [HACKERS] Review: Extensions Patch

2010-12-07 Thread Dimitri Fontaine
"David E. Wheeler" writes: > Overall I think the docs could use a lot more fleshing out. Some of > the stuff in the wiki would help a lot. At some point, though, I'll > work over the docs myself and either send a patch to you or to the > list (if it has been committed to core). Ok, I'll leave it

Re: [HACKERS] Review: Extensions Patch

2010-12-05 Thread David E. Wheeler
On Dec 4, 2010, at 6:14 AM, Dimitri Fontaine wrote: > Hi, > > Thanks for the review, that's quite one! :) > > I'm not sure to follow you all along, it seems like the reading is "try > it first then understand and comment again", so sometimes I'm not sure > if you're saying that docs are missing

Re: [HACKERS] Review: Extensions Patch

2010-12-04 Thread Dimitri Fontaine
Hi, Thanks for the review, that's quite one! :) I'm not sure to follow you all along, it seems like the reading is "try it first then understand and comment again", so sometimes I'm not sure if you're saying that docs are missing the point or that the behaviour ain't right. "David E. Wheeler" w

[HACKERS] Review: Extensions Patch

2010-12-03 Thread David E. Wheeler
Extensions Patch v15 Review === Submission review - * Is the patch in context diff format? Yes. * Does it apply cleanly to the current git master? Yes. * Does it include reasonable tests, necessary doc patches, etc? `make check` passes. `make installch