|
3 | 3 | * |
4 | 4 | * Copyright 2000 by PostgreSQL Global Development Group |
5 | 5 | * |
6 | | - * $Header: /cvsroot/pgsql/src/bin/psql/describe.c,v 1.41 2001/10/25 05:49:53 momjian Exp $ |
| 6 | + * $Header: /cvsroot/pgsql/src/bin/psql/describe.c,v 1.42 2001/11/12 15:57:08 tgl Exp $ |
7 | 7 | */ |
8 | 8 | #include"postgres_fe.h" |
9 | 9 | #include"describe.h" |
@@ -213,15 +213,14 @@ describeOperators(const char *name) |
213 | 213 | "SELECT o.oprname AS \"%s\",\n" |
214 | 214 | " CASE WHEN o.oprkind='l' THEN NULL ELSE format_type(o.oprleft, NULL) END AS \"%s\",\n" |
215 | 215 | " CASE WHEN o.oprkind='r' THEN NULL ELSE format_type(o.oprright, NULL) END AS \"%s\",\n" |
216 | | -" format_type(p.prorettype, NULL) AS \"%s\",\n" |
217 | | -" obj_description(p.oid, 'pg_proc') as \"%s\"\n" |
218 | | -"FROM pg_proc p, pg_operator o\n" |
219 | | -"WHERE RegprocToOid(o.oprcode) = p.oid\n", |
| 216 | +" format_type(o.oprresult, NULL) AS \"%s\",\n" |
| 217 | +" obj_description(o.oprcode, 'pg_proc') AS \"%s\"\n" |
| 218 | +"FROM pg_operator o\n", |
220 | 219 | _("Name"),_("Left arg type"),_("Right arg type"), |
221 | 220 | _("Result type"),_("Description")); |
222 | 221 | if (name) |
223 | 222 | { |
224 | | -strcat(buf," AND o.oprname = '"); |
| 223 | +strcat(buf,"WHERE o.oprname = '"); |
225 | 224 | strncat(buf,name,REGEXP_CUTOFF); |
226 | 225 | strcat(buf,"'\n"); |
227 | 226 | } |
|