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
29eabaa9
Commit
29eabaa9
authored
Oct 20, 2002
by
Tatsuo Ishii
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Returns exit status 1 if invalid encoding name or
encoding number is given.
parent
c918be6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
src/bin/pg_encoding/pg_encoding.c
src/bin/pg_encoding/pg_encoding.c
+11
-4
No files found.
src/bin/pg_encoding/pg_encoding.c
View file @
29eabaa9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_encoding/Attic/pg_encoding.c,v 1.1
0 2001/10/25 05:49:53 momjian
Exp $
* $Header: /cvsroot/pgsql/src/bin/pg_encoding/Attic/pg_encoding.c,v 1.1
1 2002/10/20 11:33:48 ishii
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -57,8 +57,12 @@ main(int argc, char **argv)
if
((
name
=
(
char
*
)
pg_encoding_to_char
(
enc
)))
{
if
(
be_only
&&
pg_valid_server_encoding
(
name
)
<
0
)
exit
(
0
);
printf
(
"%s
\n
"
,
name
);
exit
(
1
);
/* pg_encoding_to_char() returns "" if invalid encoding number is given */
else
if
(
strcmp
(
""
,
name
))
printf
(
"%s
\n
"
,
name
);
else
exit
(
1
);
}
exit
(
0
);
}
...
...
@@ -70,9 +74,12 @@ main(int argc, char **argv)
if
((
enc
=
pg_char_to_encoding
(
p
))
>=
0
)
{
if
(
be_only
&&
pg_valid_server_encoding
(
p
)
<
0
)
exit
(
0
);
exit
(
1
);
printf
(
"%d
\n
"
,
enc
);
}
else
exit
(
1
);
exit
(
0
);
}
exit
(
1
);
...
...
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