Re: [HACKERS] A different approach to extension NO USER DATA feature

2011-02-07 Thread Dimitri Fontaine
Hi, Tom Lane t...@sss.pgh.pa.us writes: As I work through the extensions patch, the aspect of it that I like the least is the NO USER DATA clause and related functions. I think it's badly designed, badly implemented, and doesn't solve the problem. I'm not loving it either, but wanting to

Re: [HACKERS] A different approach to extension NO USER DATA feature

2011-02-07 Thread Richard Huxton
On 06/02/11 18:23, Tom Lane wrote: After a bit of thought I believe that we can fix this if we are willing to teach pg_dump explicitly about extension configuration tables. The behavior we want for those is for the table schema definition to never be dumped (the table should always be created by

Re: [HACKERS] A different approach to extension NO USER DATA feature

2011-02-07 Thread Robert Haas
On Mon, Feb 7, 2011 at 4:18 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Or do you want to keep some generality here? I think it might be slightly advantageous to keep some generality, because some people might already have catalog columns that do this (but with a different name) or might

Re: [HACKERS] A different approach to extension NO USER DATA feature

2011-02-07 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Mon, Feb 7, 2011 at 4:18 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Or do you want to keep some generality here? I think it might be slightly advantageous to keep some generality, Yeah. I had also thought about hard-wiring the WHERE

Re: [HACKERS] A different approach to extension NO USER DATA feature

2011-02-07 Thread Tom Lane
Richard Huxton d...@archonet.com writes: Possible alternative approach? 1. Extension provides list of config tables/views/set-returning functions to be dumped via e.g. my_config_tables() 2. They get dumped, but each as a TEMP TABLE (need unique names for multiple extensions though). 3. On

Re: [HACKERS] A different approach to extension NO USER DATA feature

2011-02-07 Thread Dimitri Fontaine
Tom Lane t...@sss.pgh.pa.us writes: one I'd been thinking about a bit was OIDs of modules this one depends on. The current design doesn't cope very well with modules that depend on other ones. Or even at all. I guess here modules is referring to shared object libraries, right? Or are you

Re: [HACKERS] A different approach to extension NO USER DATA feature

2011-02-07 Thread Tom Lane
Dimitri Fontaine dimi...@2ndquadrant.fr writes: Tom Lane t...@sss.pgh.pa.us writes: one I'd been thinking about a bit was OIDs of modules this one depends on. The current design doesn't cope very well with modules that depend on other ones. Or even at all. I guess here modules is referring

Re: [HACKERS] A different approach to extension NO USER DATA feature

2011-02-07 Thread Florian Pflug
On Feb6, 2011, at 19:23 , Tom Lane wrote: After a bit of thought I believe that we can fix this if we are willing to teach pg_dump explicitly about extension configuration tables. The behavior we want for those is for the table schema definition to never be dumped (the table should always be

Re: [HACKERS] A different approach to extension NO USER DATA feature

2011-02-07 Thread Tom Lane
Florian Pflug f...@phlo.org writes: We could avoid the need for a per-row system_data flag if we required extensions to split user-editable and system-provided configuration data into different tables. For convenient access to the configuration data, the extension could let the user-editable

Re: [HACKERS] A different approach to extension NO USER DATA feature

2011-02-07 Thread David E. Wheeler
On Feb 7, 2011, at 8:57 AM, Tom Lane wrote: Yeah, this is another approach that one could take instead of having per-row flags. I'm not sure that it's better, much less so much better that we should force extensions to do it that way and not the other. But it's definitely another argument

Re: [HACKERS] A different approach to extension NO USER DATA feature

2011-02-07 Thread Tom Lane
David E. Wheeler da...@kineticode.com writes: On Feb 7, 2011, at 8:57 AM, Tom Lane wrote: Yeah, this is another approach that one could take instead of having per-row flags. I'm not sure that it's better, much less so much better that we should force extensions to do it that way and not the

Re: [HACKERS] A different approach to extension NO USER DATA feature

2011-02-06 Thread David E. Wheeler
On Feb 6, 2011, at 10:23 AM, Tom Lane wrote: I've not attempted to implement this idea, but offhand it looks like it would take a day or two's work, which seems well worthwhile to expend now in the hope of getting this feature right the first tim Seems worthwhile, and a much better approach.

Re: [HACKERS] A different approach to extension NO USER DATA feature

2011-02-06 Thread Robert Haas
On Sun, Feb 6, 2011 at 1:23 PM, Tom Lane t...@sss.pgh.pa.us wrote: I've not attempted to implement this idea, but offhand it looks like it would take a day or two's work, which seems well worthwhile to expend now in the hope of getting this feature right the first time. Comments? The design