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
92a2598f
Commit
92a2598f
authored
Jan 10, 2002
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The result of getopt() should be compared to -1, not EOF, per
pgsql-hackers discussion of this date.
parent
4d72af6c
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
20 additions
and
19 deletions
+20
-19
contrib/dbase/dbf2pg.c
contrib/dbase/dbf2pg.c
+4
-1
contrib/oid2name/oid2name.c
contrib/oid2name/oid2name.c
+1
-1
contrib/pgbench/pgbench.c
contrib/pgbench/pgbench.c
+2
-2
src/backend/bootstrap/bootstrap.c
src/backend/bootstrap/bootstrap.c
+2
-2
src/backend/postmaster/postmaster.c
src/backend/postmaster/postmaster.c
+3
-3
src/backend/tcop/postgres.c
src/backend/tcop/postgres.c
+3
-3
src/bin/pg_dump/pg_restore.c
src/bin/pg_dump/pg_restore.c
+2
-3
src/interfaces/ecpg/preproc/ecpg.c
src/interfaces/ecpg/preproc/ecpg.c
+3
-4
No files found.
contrib/dbase/dbf2pg.c
View file @
92a2598f
...
...
@@ -16,6 +16,9 @@
#ifdef HAVE_ICONV_H
#include <iconv.h>
#endif
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif
#include "libpq-fe.h"
#include "dbf.h"
...
...
@@ -673,7 +676,7 @@ main(int argc, char **argv)
char
*
query
;
dbhead
*
dbh
;
while
((
i
=
getopt
(
argc
,
argv
,
"DWflucvh:b:e:d:t:s:B:U:F:T:"
))
!=
EOF
)
while
((
i
=
getopt
(
argc
,
argv
,
"DWflucvh:b:e:d:t:s:B:U:F:T:"
))
!=
-
1
)
{
switch
(
i
)
{
...
...
contrib/oid2name/oid2name.c
View file @
92a2598f
...
...
@@ -67,7 +67,7 @@ get_opts(int argc, char **argv, struct options * my_opts)
my_opts
->
remotepass
=
0
;
/* get opts */
while
((
c
=
getopt
(
argc
,
argv
,
"H:p:U:P:d:t:o:xh?"
))
!=
EOF
)
while
((
c
=
getopt
(
argc
,
argv
,
"H:p:U:P:d:t:o:xh?"
))
!=
-
1
)
{
switch
(
c
)
{
...
...
contrib/pgbench/pgbench.c
View file @
92a2598f
/*
* $Header: /cvsroot/pgsql/contrib/pgbench/pgbench.c,v 1.1
3 2001/11/05 17:46:23 momjian
Exp $
* $Header: /cvsroot/pgsql/contrib/pgbench/pgbench.c,v 1.1
4 2002/01/10 01:11:45 tgl
Exp $
*
* pgbench: a simple TPC-B like benchmark program for PostgreSQL
* written by Tatsuo Ishii
...
...
@@ -641,7 +641,7 @@ main(int argc, char **argv)
PGconn
*
con
;
PGresult
*
res
;
while
((
c
=
getopt
(
argc
,
argv
,
"ih:nvp:dc:t:s:U:P:CS"
))
!=
EOF
)
while
((
c
=
getopt
(
argc
,
argv
,
"ih:nvp:dc:t:s:U:P:CS"
))
!=
-
1
)
{
switch
(
c
)
{
...
...
src/backend/bootstrap/bootstrap.c
View file @
92a2598f
...
...
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.1
19 2001/10/25 05:49:22 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.1
20 2002/01/10 01:11:45 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -250,7 +250,7 @@ BootstrapMain(int argc, char *argv[])
* variable */
}
while
((
flag
=
getopt
(
argc
,
argv
,
"B:dD:Fo:px:"
))
!=
EOF
)
while
((
flag
=
getopt
(
argc
,
argv
,
"B:dD:Fo:px:"
))
!=
-
1
)
{
switch
(
flag
)
{
...
...
src/backend/postmaster/postmaster.c
View file @
92a2598f
...
...
@@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.26
3 2002/01/06 21:40:02
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.26
4 2002/01/10 01:11:45
tgl Exp $
*
* NOTES
*
...
...
@@ -420,7 +420,7 @@ PostmasterMain(int argc, char *argv[])
* with the wrong argument. Death and destruction will occur.
*/
opterr
=
1
;
while
((
opt
=
getopt
(
argc
,
argv
,
"A:a:B:b:c:D:d:Fh:ik:lm:MN:no:p:Ss-:"
))
!=
EOF
)
while
((
opt
=
getopt
(
argc
,
argv
,
"A:a:B:b:c:D:d:Fh:ik:lm:MN:no:p:Ss-:"
))
!=
-
1
)
{
switch
(
opt
)
{
...
...
@@ -458,7 +458,7 @@ PostmasterMain(int argc, char *argv[])
optreset
=
1
;
/* some systems need this too */
#endif
while
((
opt
=
getopt
(
argc
,
argv
,
"A:a:B:b:c:D:d:Fh:ik:lm:MN:no:p:Ss-:"
))
!=
EOF
)
while
((
opt
=
getopt
(
argc
,
argv
,
"A:a:B:b:c:D:d:Fh:ik:lm:MN:no:p:Ss-:"
))
!=
-
1
)
{
switch
(
opt
)
{
...
...
src/backend/tcop/postgres.c
View file @
92a2598f
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.24
4 2002/01/01 23:16:22
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.24
5 2002/01/10 01:11:45
tgl Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
...
...
@@ -1165,7 +1165,7 @@ PostgresMain(int argc, char *argv[], const char *username)
secure
=
true
;
ctx
=
PGC_POSTMASTER
;
while
((
flag
=
getopt
(
argc
,
argv
,
"A:B:c:CD:d:Eef:FiNOPo:p:S:st:v:W:x:-:"
))
!=
EOF
)
while
((
flag
=
getopt
(
argc
,
argv
,
"A:B:c:CD:d:Eef:FiNOPo:p:S:st:v:W:x:-:"
))
!=
-
1
)
switch
(
flag
)
{
case
'A'
:
...
...
@@ -1626,7 +1626,7 @@ PostgresMain(int argc, char *argv[], const char *username)
if
(
!
IsUnderPostmaster
)
{
puts
(
"
\n
POSTGRES backend interactive interface "
);
puts
(
"$Revision: 1.24
4 $ $Date: 2002/01/01 23:16:22
$
\n
"
);
puts
(
"$Revision: 1.24
5 $ $Date: 2002/01/10 01:11:45
$
\n
"
);
}
/*
...
...
src/bin/pg_dump/pg_restore.c
View file @
92a2598f
...
...
@@ -34,7 +34,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_restore.c,v 1.3
1 2001/11/26 23:10:36
tgl Exp $
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_restore.c,v 1.3
2 2002/01/10 01:11:45
tgl Exp $
*
* Modifications - 28-Jun-2000 - pjw@rhyme.com.au
*
...
...
@@ -67,7 +67,6 @@
#include <termios.h>
#endif
/* FreeBSD 4.3 seems to put getopt in unistd.h */
#include <unistd.h>
#ifdef HAVE_GETOPT_H
...
...
@@ -164,7 +163,7 @@ main(int argc, char **argv)
}
#ifdef HAVE_GETOPT_LONG
while
((
c
=
getopt_long
(
argc
,
argv
,
"acCd:f:F:h:i:lL:NoOp:P:rRsS:t:T:uU:vWxX:"
,
cmdopts
,
NULL
))
!=
EOF
)
while
((
c
=
getopt_long
(
argc
,
argv
,
"acCd:f:F:h:i:lL:NoOp:P:rRsS:t:T:uU:vWxX:"
,
cmdopts
,
NULL
))
!=
-
1
)
#else
while
((
c
=
getopt
(
argc
,
argv
,
"acCd:f:F:h:i:lL:NoOp:P:rRsS:t:T:uU:vWxX:"
))
!=
-
1
)
#endif
...
...
src/interfaces/ecpg/preproc/ecpg.c
View file @
92a2598f
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.5
1 2001/10/28 06:26:11 momjian
Exp $ */
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.5
2 2002/01/10 01:11:45 tgl
Exp $ */
/* New main for ecpg, the PostgreSQL embedded SQL precompiler. */
/* (C) Michael Meskes <meskes@postgresql.org> Feb 5th, 1998 */
...
...
@@ -7,9 +7,8 @@
#include "postgres_fe.h"
#include <unistd.h>
#ifdef HAVE_GETOPT_H
#include
"getopt.h"
#include
<getopt.h>
#endif
extern
int
optind
;
...
...
@@ -108,7 +107,7 @@ main(int argc, char *const argv[])
add_include_path
(
"/usr/local/include"
);
add_include_path
(
"."
);
while
((
c
=
getopt
(
argc
,
argv
,
"vo:I:tD:d"
))
!=
EOF
)
while
((
c
=
getopt
(
argc
,
argv
,
"vo:I:tD:d"
))
!=
-
1
)
{
switch
(
c
)
{
...
...
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