mirror of
https://github.com/dbcli/pgcli.git
synced 2024-09-11 13:56:36 +03:00
Update DEVELOP.rst with external pgspecial project
This commit is contained in:
parent
1e1d980ae2
commit
2224cbd7e3
20
DEVELOP.rst
20
DEVELOP.rst
@ -66,24 +66,8 @@ Adding PostgreSQL Special (Meta) Commands
|
|||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
|
|
||||||
If you want to work on adding new meta-commands (such as `\dp`, `\ds`, `dy`),
|
If you want to work on adding new meta-commands (such as `\dp`, `\ds`, `dy`),
|
||||||
you'll be changing the code of `packages/pgspecial.py`. Search for the
|
you need to contribute to `pgspecial <https://github.com/pgcli/pgspecial/>`_
|
||||||
dictionary called `CASE_SENSITIVE_COMMANDS`. The special command us used as
|
project.
|
||||||
the dictionary key, and the value is a tuple.
|
|
||||||
|
|
||||||
The first item in the tuple is either a string (sql statement) or a function.
|
|
||||||
The second item in the tuple is a list of strings which is the documentation
|
|
||||||
for that special command. The list will have two items, the first item is the
|
|
||||||
command itself with possible options and the second item is the plain english
|
|
||||||
description of that command.
|
|
||||||
|
|
||||||
For example, `\l` is a meta-command that lists all the databases. The way you
|
|
||||||
can see the SQL statement issued by PostgreSQL when this command is executed
|
|
||||||
is to launch `psql -E` and entering `\l`.
|
|
||||||
|
|
||||||
That will print the results and also print the sql statement that was executed
|
|
||||||
to produce that result. In most cases it's a single sql statement, but sometimes
|
|
||||||
it's a series of sql statements that feed the results to each other to get to
|
|
||||||
the final result.
|
|
||||||
|
|
||||||
Building RPM and DEB packages
|
Building RPM and DEB packages
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user