Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
c9b2591e
Commit
c9b2591e
authored
Jul 14, 2008
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In psql, rename trans_* variables to translate_*, for clarity.
parent
b1845753
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
50 deletions
+50
-50
src/bin/psql/describe.c
src/bin/psql/describe.c
+34
-34
src/bin/psql/large_obj.c
src/bin/psql/large_obj.c
+2
-2
src/bin/psql/print.c
src/bin/psql/print.c
+3
-3
src/bin/psql/print.h
src/bin/psql/print.h
+3
-3
src/bin/scripts/createlang.c
src/bin/scripts/createlang.c
+4
-4
src/bin/scripts/droplang.c
src/bin/scripts/droplang.c
+4
-4
No files found.
src/bin/psql/describe.c
View file @
c9b2591e
...
...
@@ -8,7 +8,7 @@
*
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.17
6 2008/07/12 10:44:56 petere
Exp $
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.17
7 2008/07/14 22:00:04 momjian
Exp $
*/
#include "postgres_fe.h"
...
...
@@ -106,7 +106,7 @@ describeAggregates(const char *pattern, bool verbose)
myopt
.
nullPrint
=
NULL
;
myopt
.
title
=
_
(
"List of aggregate functions"
);
myopt
.
trans
_headers
=
true
;
myopt
.
trans
late_header
=
true
;
printQuery
(
res
,
&
myopt
,
pset
.
queryFout
,
pset
.
logfile
);
...
...
@@ -166,7 +166,7 @@ describeTablespaces(const char *pattern, bool verbose)
myopt
.
nullPrint
=
NULL
;
myopt
.
title
=
_
(
"List of tablespaces"
);
myopt
.
trans
_headers
=
true
;
myopt
.
trans
late_header
=
true
;
printQuery
(
res
,
&
myopt
,
pset
.
queryFout
,
pset
.
logfile
);
...
...
@@ -278,7 +278,7 @@ describeFunctions(const char *pattern, bool verbose)
myopt
.
nullPrint
=
NULL
;
myopt
.
title
=
_
(
"List of functions"
);
myopt
.
trans
_headers
=
true
;
myopt
.
trans
late_header
=
true
;
printQuery
(
res
,
&
myopt
,
pset
.
queryFout
,
pset
.
logfile
);
...
...
@@ -368,7 +368,7 @@ describeTypes(const char *pattern, bool verbose)
myopt
.
nullPrint
=
NULL
;
myopt
.
title
=
_
(
"List of data types"
);
myopt
.
trans
_headers
=
true
;
myopt
.
trans
late_header
=
true
;
printQuery
(
res
,
&
myopt
,
pset
.
queryFout
,
pset
.
logfile
);
...
...
@@ -418,7 +418,7 @@ describeOperators(const char *pattern)
myopt
.
nullPrint
=
NULL
;
myopt
.
title
=
_
(
"List of operators"
);
myopt
.
trans
_headers
=
true
;
myopt
.
trans
late_header
=
true
;
printQuery
(
res
,
&
myopt
,
pset
.
queryFout
,
pset
.
logfile
);
...
...
@@ -478,7 +478,7 @@ listAllDbs(bool verbose)
myopt
.
nullPrint
=
NULL
;
myopt
.
title
=
_
(
"List of databases"
);
myopt
.
trans
_headers
=
true
;
myopt
.
trans
late_header
=
true
;
printQuery
(
res
,
&
myopt
,
pset
.
queryFout
,
pset
.
logfile
);
...
...
@@ -497,7 +497,7 @@ permissionsList(const char *pattern)
PQExpBufferData
buf
;
PGresult
*
res
;
printQueryOpt
myopt
=
pset
.
popt
;
static
const
bool
trans_columns
[]
=
{
false
,
false
,
true
,
false
};
static
const
bool
trans
late
_columns
[]
=
{
false
,
false
,
true
,
false
};
initPQExpBuffer
(
&
buf
);
...
...
@@ -546,8 +546,8 @@ permissionsList(const char *pattern)
myopt
.
nullPrint
=
NULL
;
printfPQExpBuffer
(
&
buf
,
_
(
"Access privileges"
));
myopt
.
title
=
buf
.
data
;
myopt
.
trans
_headers
=
true
;
myopt
.
trans
_columns
=
trans
_columns
;
myopt
.
trans
late_header
=
true
;
myopt
.
trans
late_columns
=
translate
_columns
;
printQuery
(
res
,
&
myopt
,
pset
.
queryFout
,
pset
.
logfile
);
...
...
@@ -572,7 +572,7 @@ objectDescription(const char *pattern)
PQExpBufferData
buf
;
PGresult
*
res
;
printQueryOpt
myopt
=
pset
.
popt
;
static
const
bool
trans_columns
[]
=
{
false
,
false
,
true
,
false
};
static
const
bool
trans
late
_columns
[]
=
{
false
,
false
,
true
,
false
};
initPQExpBuffer
(
&
buf
);
...
...
@@ -712,8 +712,8 @@ objectDescription(const char *pattern)
myopt
.
nullPrint
=
NULL
;
myopt
.
title
=
_
(
"Object descriptions"
);
myopt
.
trans
_headers
=
true
;
myopt
.
trans
_columns
=
trans
_columns
;
myopt
.
trans
late_header
=
true
;
myopt
.
trans
late_columns
=
translate
_columns
;
printQuery
(
res
,
&
myopt
,
pset
.
queryFout
,
pset
.
logfile
);
...
...
@@ -1770,7 +1770,7 @@ listTables(const char *tabtypes, const char *pattern, bool verbose)
PQExpBufferData
buf
;
PGresult
*
res
;
printQueryOpt
myopt
=
pset
.
popt
;
static
const
bool
trans_columns
[]
=
{
false
,
false
,
true
,
false
,
false
,
false
};
static
const
bool
trans
late
_columns
[]
=
{
false
,
false
,
true
,
false
,
false
,
false
};
if
(
!
(
showTables
||
showIndexes
||
showViews
||
showSeq
))
showTables
=
showViews
=
showSeq
=
true
;
...
...
@@ -1867,8 +1867,8 @@ listTables(const char *tabtypes, const char *pattern, bool verbose)
{
myopt
.
nullPrint
=
NULL
;
myopt
.
title
=
_
(
"List of relations"
);
myopt
.
trans
_headers
=
true
;
myopt
.
trans
_columns
=
trans
_columns
;
myopt
.
trans
late_header
=
true
;
myopt
.
trans
late_columns
=
translate
_columns
;
printQuery
(
res
,
&
myopt
,
pset
.
queryFout
,
pset
.
logfile
);
}
...
...
@@ -1925,7 +1925,7 @@ listDomains(const char *pattern)
myopt
.
nullPrint
=
NULL
;
myopt
.
title
=
_
(
"List of domains"
);
myopt
.
trans
_headers
=
true
;
myopt
.
trans
late_header
=
true
;
printQuery
(
res
,
&
myopt
,
pset
.
queryFout
,
pset
.
logfile
);
...
...
@@ -1944,7 +1944,7 @@ listConversions(const char *pattern)
PQExpBufferData
buf
;
PGresult
*
res
;
printQueryOpt
myopt
=
pset
.
popt
;
static
const
bool
trans_columns
[]
=
{
false
,
false
,
false
,
false
,
true
};
static
const
bool
trans
late
_columns
[]
=
{
false
,
false
,
false
,
false
,
true
};
initPQExpBuffer
(
&
buf
);
...
...
@@ -1977,8 +1977,8 @@ listConversions(const char *pattern)
myopt
.
nullPrint
=
NULL
;
myopt
.
title
=
_
(
"List of conversions"
);
myopt
.
trans
_headers
=
true
;
myopt
.
trans
_columns
=
trans
_columns
;
myopt
.
trans
late_header
=
true
;
myopt
.
trans
late_columns
=
translate
_columns
;
printQuery
(
res
,
&
myopt
,
pset
.
queryFout
,
pset
.
logfile
);
...
...
@@ -1997,7 +1997,7 @@ listCasts(const char *pattern)
PQExpBufferData
buf
;
PGresult
*
res
;
printQueryOpt
myopt
=
pset
.
popt
;
static
const
bool
trans_columns
[]
=
{
false
,
false
,
false
,
true
};
static
const
bool
trans
late
_columns
[]
=
{
false
,
false
,
false
,
true
};
initPQExpBuffer
(
&
buf
);
/*
...
...
@@ -2032,8 +2032,8 @@ listCasts(const char *pattern)
myopt
.
nullPrint
=
NULL
;
myopt
.
title
=
_
(
"List of casts"
);
myopt
.
trans
_headers
=
true
;
myopt
.
trans
_columns
=
trans
_columns
;
myopt
.
trans
late_header
=
true
;
myopt
.
trans
late_columns
=
translate
_columns
;
printQuery
(
res
,
&
myopt
,
pset
.
queryFout
,
pset
.
logfile
);
...
...
@@ -2085,7 +2085,7 @@ listSchemas(const char *pattern, bool verbose)
myopt
.
nullPrint
=
NULL
;
myopt
.
title
=
_
(
"List of schemas"
);
myopt
.
trans
_headers
=
true
;
myopt
.
trans
late_header
=
true
;
printQuery
(
res
,
&
myopt
,
pset
.
queryFout
,
pset
.
logfile
);
...
...
@@ -2142,7 +2142,7 @@ listTSParsers(const char *pattern, bool verbose)
myopt
.
nullPrint
=
NULL
;
myopt
.
title
=
_
(
"List of text search parsers"
);
myopt
.
trans
_headers
=
true
;
myopt
.
trans
late_header
=
true
;
printQuery
(
res
,
&
myopt
,
pset
.
queryFout
,
pset
.
logfile
);
...
...
@@ -2225,7 +2225,7 @@ describeOneTSParser(const char *oid, const char *nspname, const char *prsname)
PGresult
*
res
;
char
title
[
1024
];
printQueryOpt
myopt
=
pset
.
popt
;
static
const
bool
trans_columns
[]
=
{
true
,
false
,
false
};
static
const
bool
trans
late
_columns
[]
=
{
true
,
false
,
false
};
initPQExpBuffer
(
&
buf
);
...
...
@@ -2286,8 +2286,8 @@ describeOneTSParser(const char *oid, const char *nspname, const char *prsname)
myopt
.
title
=
title
;
myopt
.
footers
=
NULL
;
myopt
.
default_footer
=
false
;
myopt
.
trans
_headers
=
true
;
myopt
.
trans
_columns
=
trans
_columns
;
myopt
.
trans
late_header
=
true
;
myopt
.
trans
late_columns
=
translate
_columns
;
printQuery
(
res
,
&
myopt
,
pset
.
queryFout
,
pset
.
logfile
);
...
...
@@ -2317,8 +2317,8 @@ describeOneTSParser(const char *oid, const char *nspname, const char *prsname)
myopt
.
title
=
title
;
myopt
.
footers
=
NULL
;
myopt
.
default_footer
=
true
;
myopt
.
trans
_headers
=
true
;
myopt
.
trans_columns
=
NULL
;
myopt
.
trans
late_header
=
true
;
myopt
.
trans
late
_columns
=
NULL
;
printQuery
(
res
,
&
myopt
,
pset
.
queryFout
,
pset
.
logfile
);
...
...
@@ -2386,7 +2386,7 @@ listTSDictionaries(const char *pattern, bool verbose)
myopt
.
nullPrint
=
NULL
;
myopt
.
title
=
_
(
"List of text search dictionaries"
);
myopt
.
trans
_headers
=
true
;
myopt
.
trans
late_header
=
true
;
printQuery
(
res
,
&
myopt
,
pset
.
queryFout
,
pset
.
logfile
);
...
...
@@ -2454,7 +2454,7 @@ listTSTemplates(const char *pattern, bool verbose)
myopt
.
nullPrint
=
NULL
;
myopt
.
title
=
_
(
"List of text search templates"
);
myopt
.
trans
_headers
=
true
;
myopt
.
trans
late_header
=
true
;
printQuery
(
res
,
&
myopt
,
pset
.
queryFout
,
pset
.
logfile
);
...
...
@@ -2511,7 +2511,7 @@ listTSConfigs(const char *pattern, bool verbose)
myopt
.
nullPrint
=
NULL
;
myopt
.
title
=
_
(
"List of text search configurations"
);
myopt
.
trans
_headers
=
true
;
myopt
.
trans
late_header
=
true
;
printQuery
(
res
,
&
myopt
,
pset
.
queryFout
,
pset
.
logfile
);
...
...
@@ -2649,7 +2649,7 @@ describeOneTSConfig(const char *oid, const char *nspname, const char *cfgname,
myopt
.
title
=
title
.
data
;
myopt
.
footers
=
NULL
;
myopt
.
default_footer
=
false
;
myopt
.
trans
_headers
=
true
;
myopt
.
trans
late_header
=
true
;
printQuery
(
res
,
&
myopt
,
pset
.
queryFout
,
pset
.
logfile
);
...
...
src/bin/psql/large_obj.c
View file @
c9b2591e
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/large_obj.c,v 1.5
0 2008/01/01 19:45:56
momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/large_obj.c,v 1.5
1 2008/07/14 22:00:04
momjian Exp $
*/
#include "postgres_fe.h"
#include "large_obj.h"
...
...
@@ -293,7 +293,7 @@ do_lo_list(void)
myopt
.
topt
.
tuples_only
=
false
;
myopt
.
nullPrint
=
NULL
;
myopt
.
title
=
_
(
"Large objects"
);
myopt
.
trans
_headers
=
true
;
myopt
.
trans
late_header
=
true
;
printQuery
(
res
,
&
myopt
,
pset
.
queryFout
,
pset
.
logfile
);
...
...
src/bin/psql/print.c
View file @
c9b2591e
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.10
8 2008/05/21 16:00:10 mha
Exp $
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.10
9 2008/07/14 22:00:04 momjian
Exp $
*/
#include "postgres_fe.h"
...
...
@@ -2313,7 +2313,7 @@ printQuery(const PGresult *result, const printQueryOpt *opt, FILE *fout, FILE *f
}
printTableAddHeader
(
&
cont
,
PQfname
(
result
,
i
),
opt
->
trans
_headers
,
align
);
opt
->
trans
late_header
,
align
);
}
/* set cells */
...
...
@@ -2329,7 +2329,7 @@ printQuery(const PGresult *result, const printQueryOpt *opt, FILE *fout, FILE *f
else
cell
=
PQgetvalue
(
result
,
r
,
c
);
translate
=
(
opt
->
trans
_columns
&&
opt
->
trans
_columns
[
c
]);
translate
=
(
opt
->
trans
late_columns
&&
opt
->
translate
_columns
[
c
]);
printTableAddCell
(
&
cont
,
cell
,
translate
);
}
}
...
...
src/bin/psql/print.h
View file @
c9b2591e
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/print.h,v 1.3
7 2008/05/12 22:59:58 alvherre
Exp $
* $PostgreSQL: pgsql/src/bin/psql/print.h,v 1.3
8 2008/07/14 22:00:04 momjian
Exp $
*/
#ifndef PRINT_H
#define PRINT_H
...
...
@@ -90,8 +90,8 @@ typedef struct printQueryOpt
char
*
title
;
/* override title */
char
**
footers
;
/* override footer (default is "(xx rows)") */
bool
default_footer
;
/* print default footer if footers==NULL */
bool
trans
_headers
;
/* do gettext on column headers */
const
bool
*
trans
_columns
;
/* trans
_columns[i-1] => do gettext on col i */
bool
trans
late_header
;
/* do gettext on column headers */
const
bool
*
trans
late_columns
;
/* translate
_columns[i-1] => do gettext on col i */
}
printQueryOpt
;
...
...
src/bin/scripts/createlang.c
View file @
c9b2591e
...
...
@@ -5,7 +5,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/bin/scripts/createlang.c,v 1.
29 2008/01/01 19:45:56
momjian Exp $
* $PostgreSQL: pgsql/src/bin/scripts/createlang.c,v 1.
30 2008/07/14 22:00:04
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -125,7 +125,7 @@ main(int argc, char *argv[])
if
(
listlangs
)
{
printQueryOpt
popt
;
static
const
bool
trans_columns
[]
=
{
false
,
true
};
static
const
bool
trans
late
_columns
[]
=
{
false
,
true
};
conn
=
connectDatabase
(
dbname
,
host
,
port
,
username
,
password
,
progname
);
...
...
@@ -145,8 +145,8 @@ main(int argc, char *argv[])
popt
.
topt
.
stop_table
=
true
;
popt
.
topt
.
encoding
=
PQclientEncoding
(
conn
);
popt
.
title
=
_
(
"Procedural Languages"
);
popt
.
trans
_headers
=
true
;
popt
.
trans
_columns
=
trans
_columns
;
popt
.
trans
late_header
=
true
;
popt
.
trans
late_columns
=
translate
_columns
;
printQuery
(
result
,
&
popt
,
stdout
,
NULL
);
PQfinish
(
conn
);
...
...
src/bin/scripts/droplang.c
View file @
c9b2591e
...
...
@@ -5,7 +5,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/bin/scripts/droplang.c,v 1.2
6 2008/01/01 19:45:56
momjian Exp $
* $PostgreSQL: pgsql/src/bin/scripts/droplang.c,v 1.2
7 2008/07/14 22:00:04
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -136,7 +136,7 @@ main(int argc, char *argv[])
if
(
listlangs
)
{
printQueryOpt
popt
;
static
const
bool
trans_columns
[]
=
{
false
,
true
};
static
const
bool
trans
late
_columns
[]
=
{
false
,
true
};
conn
=
connectDatabase
(
dbname
,
host
,
port
,
username
,
password
,
progname
);
...
...
@@ -156,8 +156,8 @@ main(int argc, char *argv[])
popt
.
topt
.
stop_table
=
true
;
popt
.
topt
.
encoding
=
PQclientEncoding
(
conn
);
popt
.
title
=
_
(
"Procedural Languages"
);
popt
.
trans
_headers
=
true
;
popt
.
trans
_columns
=
trans
_columns
;
popt
.
trans
late_header
=
true
;
popt
.
trans
late_columns
=
translate
_columns
;
printQuery
(
result
,
&
popt
,
stdout
,
NULL
);
PQfinish
(
conn
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment