Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite6ed9f2

Browse files
committed
Fix typo in \z.
1 parent8792af7 commite6ed9f2

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

‎src/bin/psql/describe.c

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Team
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/describe.c,v 1.13 2000/01/18 23:30:23 petere Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/describe.c,v 1.14 2000/01/20 15:29:20 momjian Exp $
77
*/
88
#include<c.h>
99
#include"describe.h"
@@ -49,10 +49,10 @@ describeAggregates(const char *name)
4949
*/
5050
strcpy(buf,
5151
"SELECT a.aggname AS \"Name\", t.typname AS \"Type\",\n"
52-
" obj_description(a.oid) as \"Description\"\n"
53-
"FROM pg_aggregate a, pg_type t\n"
54-
"WHERE a.aggbasetype = t.oid\n"
55-
);
52+
" obj_description(a.oid) as \"Description\"\n"
53+
"FROM pg_aggregate a, pg_type t\n"
54+
"WHERE a.aggbasetype = t.oid\n"
55+
);
5656

5757
if (name)
5858
{
@@ -64,10 +64,10 @@ describeAggregates(const char *name)
6464
strcat(buf,
6565
"UNION\n"
6666
"SELECT a.aggname AS \"Name\", '(all types)' as \"Type\",\n"
67-
" obj_description(a.oid) as \"Description\"\n"
67+
" obj_description(a.oid) as \"Description\"\n"
6868
"FROM pg_aggregate a\n"
69-
"WHERE a.aggbasetype = 0\n"
70-
);
69+
"WHERE a.aggbasetype = 0\n"
70+
);
7171

7272
if (name)
7373
{
@@ -107,11 +107,11 @@ describeFunctions(const char *name, bool verbose)
107107
* arguments, but have no types defined for those arguments
108108
*/
109109
strcpy(buf,
110-
"SELECT t.typname as \"Result\", p.proname as \"Function\",\n"
110+
"SELECT t.typname as \"Result\", p.proname as \"Function\",\n"
111111
" oidvectortypes(p.proargtypes) as \"Arguments\"");
112112
if (verbose)
113113
strcat(buf,",\n u.usename as \"Owner\", l.lanname as \"Language\", p.prosrc as \"Source\",\n"
114-
" obj_description(p.oid) as \"Description\"");
114+
" obj_description(p.oid) as \"Description\"");
115115

116116
if (!verbose)
117117
strcat(buf,
@@ -159,7 +159,7 @@ describeTypes(const char *name, bool verbose)
159159

160160
strcpy(buf,"SELECT t.typname AS \"Type\"");
161161
if (verbose)
162-
strcat(buf,",\n (CASE WHEN t.typlen = -1 THEN 'var'::text ELSE t.typlen::text END) as \"Size\"");
162+
strcat(buf,",\n (CASE WHEN t.typlen = -1 THEN 'var'::text ELSE t.typlen::text END) as \"Size\"");
163163
strcat(buf,",\n obj_description(t.oid) as \"Description\"");
164164
/*
165165
* do not include array types (start with underscore),
@@ -200,12 +200,12 @@ describeOperators(const char *name)
200200
printQueryOptmyopt=pset.popt;
201201

202202
strcpy(buf,
203-
"SELECT o.oprname AS \"Op\",\n"
203+
"SELECT o.oprname AS \"Op\",\n"
204204
" t1.typname AS \"Left arg\",\n"
205205
" t2.typname AS \"Right arg\",\n"
206206
" t0.typname AS \"Result\",\n"
207207
" obj_description(p.oid) as \"Description\"\n"
208-
"FROM pg_proc p, pg_type t0,\n"
208+
"FROM pg_proc p, pg_type t0,\n"
209209
" pg_type t1, pg_type t2,\n"
210210
" pg_operator o\n"
211211
"WHERE p.prorettype = t0.oid AND\n"
@@ -225,8 +225,8 @@ describeOperators(const char *name)
225225
" ''::name AS \"Left arg\",\n"
226226
" t1.typname AS \"Right arg\",\n"
227227
" t0.typname AS \"Result\",\n"
228-
" obj_description(p.oid) as \"Description\"\n"
229-
"FROM pg_operator o, pg_proc p, pg_type t0, pg_type t1\n"
228+
" obj_description(p.oid) as \"Description\"\n"
229+
"FROM pg_operator o, pg_proc p, pg_type t0, pg_type t1\n"
230230
"WHERE RegprocToOid(o.oprcode) = p.oid AND\n"
231231
" o.oprresult = t0.oid AND\n"
232232
" o.oprkind = 'l' AND\n"
@@ -243,8 +243,8 @@ describeOperators(const char *name)
243243
" t1.typname AS \"Left arg\",\n"
244244
" ''::name AS \"Right arg\",\n"
245245
" t0.typname AS \"Result\",\n"
246-
" obj_description(p.oid) as \"Description\"\n"
247-
"FROM pg_operator o, pg_proc p, pg_type t0, pg_type t1\n"
246+
" obj_description(p.oid) as \"Description\"\n"
247+
"FROM pg_operator o, pg_proc p, pg_type t0, pg_type t1\n"
248248
"WHERE RegprocToOid(o.oprcode) = p.oid AND\n"
249249
" o.oprresult = t0.oid AND\n"
250250
" o.oprkind = 'r' AND\n"
@@ -284,7 +284,7 @@ listAllDbs(bool desc)
284284
printQueryOptmyopt=pset.popt;
285285

286286
strcpy(buf,
287-
"SELECT pg_database.datname as \"Database\",\n"
287+
"SELECT pg_database.datname as \"Database\",\n"
288288
" pg_user.usename as \"Owner\"");
289289
#ifdefMULTIBYTE
290290
strcat(buf,
@@ -299,7 +299,7 @@ listAllDbs(bool desc)
299299
strcat(buf,"\nUNION\n\n");
300300

301301
strcat(buf,
302-
"SELECT pg_database.datname as \"Database\",\n"
302+
"SELECT pg_database.datname as \"Database\",\n"
303303
" NULL as \"Owner\"");
304304
#ifdefMULTIBYTE
305305
strcat(buf,
@@ -346,7 +346,7 @@ permissionsList(const char *name)
346346
" relname !~ '^pg_'\n");
347347
if (name)
348348
{
349-
strcat(descbuf," ANDrename ~ '");
349+
strcat(descbuf," ANDrelname ~ '");
350350
strncat(descbuf,name,REGEXP_CUTOFF);
351351
strcat(descbuf,"'\n");
352352
}
@@ -867,7 +867,7 @@ describeTableDetails(const char *name, bool desc)
867867
}
868868

869869
if (!error)
870-
printTable(title,headers, (constchar**)cells, (constchar**)footers,"llll",&myopt,pset.queryFout);
870+
printTable(title,headers, (constchar**)cells, (constchar**)footers,"llll",&myopt,pset.queryFout);
871871

872872
/* clean up */
873873
free(title);
@@ -940,14 +940,14 @@ listTables(const char *infotype, const char *name, bool desc)
940940
strcat(buf,"'\n");
941941
}
942942

943-
strcat(buf,"UNION\n");
943+
strcat(buf,"UNION\n");
944944
strcat(buf,"SELECT c.relname as \"Name\", 'table'::text as \"Type\", NULL as \"Owner\"");
945945
if (desc)
946946
strcat(buf,", obj_description(c.oid) as \"Description\"");
947947
strcat(buf,"\nFROM pg_class c\n"
948948
"WHERE c.relkind = 'r'\n"
949949
" AND not exists (select 1 from pg_views where viewname = c.relname)\n"
950-
" AND not exists (select 1 from pg_user where usesysid = c.relowner)\n");
950+
" AND not exists (select 1 from pg_user where usesysid = c.relowner)\n");
951951
strcat(buf,showSystem ?" AND c.relname ~ '^pg_'\n" :" AND c.relname !~ '^pg_'\n");
952952
if (name)
953953
{
@@ -977,14 +977,14 @@ listTables(const char *infotype, const char *name, bool desc)
977977
strcat(buf,"'\n");
978978
}
979979

980-
strcat(buf,"UNION\n");
980+
strcat(buf,"UNION\n");
981981
strcat(buf,"SELECT c.relname as \"Name\", 'view'::text as \"Type\", NULL as \"Owner\"");
982982
if (desc)
983983
strcat(buf,", obj_description(c.oid) as \"Description\"");
984984
strcat(buf,"\nFROM pg_class c\n"
985985
"WHERE c.relkind = 'r'\n"
986986
" AND exists (select 1 from pg_views where viewname = c.relname)\n"
987-
" AND not exists (select 1 from pg_user where usesysid = c.relowner)\n");
987+
" AND not exists (select 1 from pg_user where usesysid = c.relowner)\n");
988988
strcat(buf,showSystem ?" AND c.relname ~ '^pg_'\n" :" AND c.relname !~ '^pg_'\n");
989989
if (name)
990990
{
@@ -1029,7 +1029,7 @@ listTables(const char *infotype, const char *name, bool desc)
10291029
strcat(buf,"'\n");
10301030
}
10311031

1032-
strcat(buf,"UNION\n");
1032+
strcat(buf,"UNION\n");
10331033
strcat(buf,
10341034
"SELECT c.relname as \"Name\",\n"
10351035
" (CASE WHEN relkind = 'S' THEN 'sequence'::text ELSE 'index'::text END) as \"Type\",\n"
@@ -1078,13 +1078,13 @@ listTables(const char *infotype, const char *name, bool desc)
10781078
strcat(buf,"'\n");
10791079
}
10801080

1081-
strcat(buf,"UNION\n");
1081+
strcat(buf,"UNION\n");
10821082
strcat(buf,"SELECT c.relname as \"Name\", 'special'::text as \"Type\", NULL as \"Owner\"");
10831083
if (desc)
10841084
strcat(buf,", obj_description(c.oid) as \"Description\"");
10851085
strcat(buf,"\nFROM pg_class c\n"
10861086
"WHERE c.relkind = 's'\n"
1087-
" AND not exists (select 1 from pg_user where usesysid = c.relowner)");
1087+
" AND not exists (select 1 from pg_user where usesysid = c.relowner)");
10881088
if (name)
10891089
{
10901090
strcat(buf," AND c.relname ~ '");
@@ -1102,10 +1102,10 @@ listTables(const char *infotype, const char *name, bool desc)
11021102

11031103
if (PQntuples(res)==0&& !QUIET())
11041104
{
1105-
if (name)
1106-
fprintf(pset.queryFout,"No matching relations found.\n");
1107-
else
1108-
fprintf(pset.queryFout,"No relations found.\n");
1105+
if (name)
1106+
fprintf(pset.queryFout,"No matching relations found.\n");
1107+
else
1108+
fprintf(pset.queryFout,"No relations found.\n");
11091109
}
11101110
else
11111111
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp