Commit 930bce33 authored by Bruce Momjian's avatar Bruce Momjian

Re-ordeer new \d command output.

parent 12fc3307
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.107 1997/11/16 04:36:20 momjian Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.108 1997/11/16 05:32:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -1719,11 +1719,11 @@ HandleSlashCmds(PsqlSettings *pset, ...@@ -1719,11 +1719,11 @@ HandleSlashCmds(PsqlSettings *pset,
{ {
/* operators */ /* operators */
SendQuery(&success, pset,"\ SendQuery(&success, pset,"\
SELECT t0.typname AS result, \ SELECT o.oprname AS operator_, \
p.proname AS func_name, \
t0.typname AS result, \
t1.typname AS left_type, \ t1.typname AS left_type, \
t2.typname AS right_type, \ t2.typname AS right_type, \
o.oprname AS operatr, \
p.proname AS func_name, \
obj_description(o.oid) as description \ obj_description(o.oid) as description \
FROM pg_proc p, pg_type t0, \ FROM pg_proc p, pg_type t0, \
pg_type t1, pg_type t2, \ pg_type t1, pg_type t2, \
...@@ -1733,29 +1733,34 @@ HandleSlashCmds(PsqlSettings *pset, ...@@ -1733,29 +1733,34 @@ HandleSlashCmds(PsqlSettings *pset,
p.pronargs = 2 AND \ p.pronargs = 2 AND \
o.oprleft = t1.oid AND \ o.oprleft = t1.oid AND \
o.oprright = t2.oid \ o.oprright = t2.oid \
ORDER BY result, left_type, right_type, operatr;", ORDER BY operator_, func_name, result, left_type, \
right_type;",
false, false, 0); false, false, 0);
SendQuery(&success, pset,"\ SendQuery(&success, pset,"\
SELECT o.oprname AS left_unary, \ SELECT o.oprname AS left_unary, \
t.typname AS operand, \ p.proname AS func_name, \
r.typname AS return_type, \ t0.typname AS return_type, \
t1.typname AS operand, \
obj_description(o.oid) as description \ obj_description(o.oid) as description \
FROM pg_operator o, pg_type t, pg_type r \ FROM pg_operator o, pg_proc p, pg_type t0, pg_type t1 \
WHERE o.oprkind = 'l' AND \ WHERE RegprocToOid(o.oprcode) = p.oid AND \
o.oprright = t.oid AND \ o.oprresult = t0.oid AND \
o.oprresult = r.oid \ o.oprkind = 'l' AND \
ORDER BY operand;", o.oprright = t1.oid \
ORDER BY left_unary, func_name, return_type, operand;",
false, false, 0); false, false, 0);
SendQuery(&success, pset,"\ SendQuery(&success, pset,"\
SELECT o.oprname AS right_unary, \ SELECT o.oprname AS right_unary, \
t.typname AS operand, \ p.proname AS func_name, \
r.typname AS return_type, \ t0.typname AS return_type, \
t1.typname AS operand, \
obj_description(o.oid) as description \ obj_description(o.oid) as description \
FROM pg_operator o, pg_type t, pg_type r \ FROM pg_operator o, pg_proc p, pg_type t0, pg_type t1 \
WHERE o.oprkind = 'r' AND \ WHERE RegprocToOid(o.oprcode) = p.oid AND \
o.oprleft = t.oid AND \ o.oprresult = t0.oid AND \
o.oprresult = r.oid \ o.oprkind = 'r' AND \
ORDER BY operand;", o.oprleft = t1.oid \
ORDER BY right_unary, func_name, return_type, operand;",
false, false, 0); false, false, 0);
} }
else if (strncmp(cmd, "ds", 2) == 0) else if (strncmp(cmd, "ds", 2) == 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment