Re: [HACKERS] Refactoring psql for backward-compatibility

2005-12-14 Thread Christopher Kings-Lynne
If it was me I'd just copy the pg_dump way of doing things... To the extent possible, I'd like to preserve the exact functionality (or lack thereof) of previous versions. Would this be possible that way? Don't see it'd be too hard. All pg_dump basically does is this: if (version <= 7.3) {

Re: [HACKERS] Refactoring psql for backward-compatibility

2005-12-14 Thread David Fetter
On Thu, Dec 15, 2005 at 09:20:46AM +0800, Christopher Kings-Lynne wrote: > >Neil Conway suggested something like a get_function_list(), which I > >presume would be called on connect, and would be version-aware. > >Does this seem like a good idea? If so, what might an > >implementation look like?

Re: [HACKERS] Refactoring psql for backward-compatibility

2005-12-14 Thread Christopher Kings-Lynne
Neil Conway suggested something like a get_function_list(), which I presume would be called on connect, and would be version-aware. Does this seem like a good idea? If so, what might an implementation look like? I know C isn't all that great for function overloading, so do we want to keep all t

Re: [HACKERS] Refactoring psql for backward-compatibility

2005-12-14 Thread Hannu Krosing
Ühel kenal päeval, K, 2005-12-14 kell 01:52, kirjutas David Fetter: > Folks, > > I'm trying to come up with a design for \ commands in psql in 8.2. > 8.1 broke just about every \ command because they now depend on roles, > which is great for 8.1 or better, but not so good if you're connecting > to

Re: [HACKERS] Refactoring psql for backward-compatibility

2005-12-14 Thread Alvaro Herrera
Andrew Dunstan wrote: > > David Fetter wrote: > > >I'd much appeciate tips, specific RTFMs and feedback on this so I can > >get cracking on a patch. > > well, before you even start on a patch we should have agreement that > this is a good idea, and an agreed design. > > This is really an m * n

Re: [HACKERS] Refactoring psql for backward-compatibility

2005-12-14 Thread Andrew Dunstan
David Fetter wrote: I'd much appeciate tips, specific RTFMs and feedback on this so I can get cracking on a patch. well, before you even start on a patch we should have agreement that this is a good idea, and an agreed design. This is really an m * n problem. That's what does indeed

Re: [HACKERS] Refactoring psql for backward-compatibility

2005-12-14 Thread Martijn van Oosterhout
On Wed, Dec 14, 2005 at 01:52:56AM -0800, David Fetter wrote: > Folks, > > I'm trying to come up with a design for \ commands in psql in 8.2. > 8.1 broke just about every \ command because they now depend on roles, > which is great for 8.1 or better, but not so good if you're connecting > to DBs <

[HACKERS] Refactoring psql for backward-compatibility

2005-12-14 Thread David Fetter
Folks, I'm trying to come up with a design for \ commands in psql in 8.2. 8.1 broke just about every \ command because they now depend on roles, which is great for 8.1 or better, but not so good if you're connecting to DBs <= 8.0. So, I'm volunteering to code up the next version of psql, which wi