Hash: SHA1
> It's nice, but currently there are a lot of ways in which psql is
> broken regarding older server versions.  We should be caring about
> all of them (ideal), or about none (the current situation).
> There have been proposals in the past about making that happen.  You
> could investigate that (please do -- I'd love to have a cross-version
> psql, in the same way we have a cross-version compatible pg_dump).
The ultimate goal, of course, is to get to a more cross-version psql:
this is simply the first (but important) step in that direction. I was
a part of the previous discussions and remember them well. The basic
problem behind making psql able to handle previous versions was that
it would take some work and nobody felt like tackling it. Well, I finally
got irked enough when testing 7.5^H^H8.0 and psql'ing to my 7.4 database
(and getting reltablespace errors) that I decided to finally bite the
bullet. The 7.4 -> 7.5 jump is fairly easy, the 7.3 compatibility will
be a lot tougher. This will at least allow it to be used against the
previous version (7.4), which is a good start.
> The way of your patch is certain to lead into a mantainance nightmare :-(
Can you elaborate on that? There is no real simple way to do it, but
storing the version as a simple 9-digit int[1] and using ifs seems the easiest.
If there are too many ifs cluttering a section we can certainly consider
making separate functions, but right now nothing warrants that. My patch to
ignore tablespace in pre-7.5 has three additional checks inside of
describe.c, which I don't think is too bad.
 [1] If we can guarantee that we will never reach a "hundred" in any version
portion of PostgreSQL, the number could be smaller and easier to handle,
of course, but better safe than sorry.
- --
Greg Sabino Mullane [EMAIL PROTECTED]
PGP Key: 0x14964AC8 200408072054

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to