TODO: Move psql backslash information into views
Committer needs to bump CATVERSION
This goes a little further than the TODO entry...
A table psql_commands in the new pg_tools schema which holds a regular
expression "command" and a couple of columns with sql. The command is
matched against what the user types in, allowing psql commands to be
backend based -- not psql based.
The two columns holding queries are for the table structure (arbitrary)
and the footer area, which resolves down to category and info.
The display is the same as it used to be, as are all of the commands
except for \dd <param>. Preparing that particular query seems to fail,
and I can't see anything wrong with it or PostgreSQL.
It would be *very* simple to add long versions of all the commands
should that be wanted.
A gettext() function has been moved into the backend to continue support
of various text transformations in the functions. I'm not sure how
Peters scripts work, but I doubt they currently function with this
Since identities (columns) cannot be changed by a function, they're
still doing their gettext() call within the psql client.
There are a few hardcoded keywords for expected results in psql. This
was done to accommodate the multi-table output for the \d *.* style
command. It's expected that these commands will exist, though the
structure is determined by the back-end and not psql.
Backward compatibility is completely broken. This isn't much of a
problem as the protocol change will also break backward compatibility in
a much harsher fashion. Needless to say, pre-7.4 client/libraries will
not work with 7.4 very nicely.
In my own installation, in certain databases, I've added special
'internal' commands that will do pre-set queries with display in psql.
\bt <date> -> lists off billing transactions for that date.
\email <clientid> -> Gives me a clients email based on client id.
Takes seconds to add a new command to psql if you already have the
Rod Taylor <rbt(at)rbt(dot)ca>
PGP Key: http://www.rbt.ca/rbtpub.asc
pgsql-patches by date
|Next:||From: Christopher Kings-Lynne||Date: 2003-02-28 07:58:56|
|Subject: improve table dumping|
|Previous:||From: Christopher Kings-Lynne||Date: 2003-02-28 02:03:44|
|Subject: Re: Dump CLUSTER in pg_dump|