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
d7a343d5
Commit
d7a343d5
authored
Nov 12, 2001
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add port number to pg_dumplo.
andrea gelmini
parent
611afd9f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
contrib/pg_dumplo/main.c
contrib/pg_dumplo/main.c
+11
-4
contrib/pg_dumplo/pg_dumplo.h
contrib/pg_dumplo/pg_dumplo.h
+2
-1
No files found.
contrib/pg_dumplo/main.c
View file @
d7a343d5
/* -------------------------------------------------------------------------
/* -------------------------------------------------------------------------
* pg_dumplo
* pg_dumplo
*
*
* $Header: /cvsroot/pgsql/contrib/pg_dumplo/Attic/main.c,v 1.
9 2001/10/25 05:49:19
momjian Exp $
* $Header: /cvsroot/pgsql/contrib/pg_dumplo/Attic/main.c,v 1.
10 2001/11/12 17:44:14
momjian Exp $
*
*
* Karel Zak 1999-2000
* Karel Zak 1999-2000
* -------------------------------------------------------------------------
* -------------------------------------------------------------------------
...
@@ -56,6 +56,7 @@ main(int argc, char **argv)
...
@@ -56,6 +56,7 @@ main(int argc, char **argv)
pgLO
->
user
=
NULL
;
pgLO
->
user
=
NULL
;
pgLO
->
db
=
NULL
;
pgLO
->
db
=
NULL
;
pgLO
->
host
=
NULL
;
pgLO
->
host
=
NULL
;
pgLO
->
port
=
NULL
;
pgLO
->
space
=
NULL
;
pgLO
->
space
=
NULL
;
pgLO
->
index
=
NULL
;
pgLO
->
index
=
NULL
;
pgLO
->
remove
=
FALSE
;
pgLO
->
remove
=
FALSE
;
...
@@ -81,6 +82,7 @@ main(int argc, char **argv)
...
@@ -81,6 +82,7 @@ main(int argc, char **argv)
{
"pwd"
,
required_argument
,
0
,
'p'
},
{
"pwd"
,
required_argument
,
0
,
'p'
},
{
"db"
,
required_argument
,
0
,
'd'
},
{
"db"
,
required_argument
,
0
,
'd'
},
{
"host"
,
required_argument
,
0
,
'h'
},
{
"host"
,
required_argument
,
0
,
'h'
},
{
"port"
,
required_argument
,
0
,
'o'
},
{
"space"
,
required_argument
,
0
,
's'
},
{
"space"
,
required_argument
,
0
,
's'
},
{
"import"
,
no_argument
,
0
,
'i'
},
{
"import"
,
no_argument
,
0
,
'i'
},
{
"export"
,
no_argument
,
0
,
'e'
},
{
"export"
,
no_argument
,
0
,
'e'
},
...
@@ -91,10 +93,10 @@ main(int argc, char **argv)
...
@@ -91,10 +93,10 @@ main(int argc, char **argv)
{
NULL
,
0
,
0
,
0
}
{
NULL
,
0
,
0
,
0
}
};
};
while
((
arg
=
getopt_long
(
argc
,
argv
,
"?aehu:p:qd:l:t:irs:w"
,
l_opt
,
&
l_index
))
!=
-
1
)
while
((
arg
=
getopt_long
(
argc
,
argv
,
"?aeh
o:
u:p:qd:l:t:irs:w"
,
l_opt
,
&
l_index
))
!=
-
1
)
{
{
#else
#else
while
((
arg
=
getopt
(
argc
,
argv
,
"?aehu:p:qd:l:t:irs:w"
))
!=
-
1
)
while
((
arg
=
getopt
(
argc
,
argv
,
"?aeh
o:
u:p:qd:l:t:irs:w"
))
!=
-
1
)
{
{
#endif
#endif
switch
(
arg
)
switch
(
arg
)
...
@@ -109,6 +111,9 @@ main(int argc, char **argv)
...
@@ -109,6 +111,9 @@ main(int argc, char **argv)
case
't'
:
case
't'
:
pgLO
->
host
=
strdup
(
optarg
);
pgLO
->
host
=
strdup
(
optarg
);
break
;
break
;
case
'o'
:
pgLO
->
port
=
strdup
(
optarg
);
break
;
case
'p'
:
case
'p'
:
pwd
=
strdup
(
optarg
);
pwd
=
strdup
(
optarg
);
break
;
break
;
...
@@ -173,7 +178,7 @@ main(int argc, char **argv)
...
@@ -173,7 +178,7 @@ main(int argc, char **argv)
/*
/*
* Make connection
* Make connection
*/
*/
pgLO
->
conn
=
PQsetdbLogin
(
pgLO
->
host
,
NULL
,
NULL
,
NULL
,
pgLO
->
db
,
pgLO
->
conn
=
PQsetdbLogin
(
pgLO
->
host
,
pgLO
->
port
,
NULL
,
NULL
,
pgLO
->
db
,
pgLO
->
user
,
pwd
);
pgLO
->
user
,
pwd
);
if
(
PQstatus
(
pgLO
->
conn
)
==
CONNECTION_BAD
)
if
(
PQstatus
(
pgLO
->
conn
)
==
CONNECTION_BAD
)
...
@@ -279,6 +284,7 @@ usage()
...
@@ -279,6 +284,7 @@ usage()
"-p --password=<password> password for connection to server
\n
"
"-p --password=<password> password for connection to server
\n
"
"-d --db=<database> database name
\n
"
"-d --db=<database> database name
\n
"
"-t --host=<hostname> server hostname
\n
"
"-t --host=<hostname> server hostname
\n
"
"-o --port=<port> database server port (default: 5432)
\n
"
"-s --space=<dir> directory with dump tree (for export/import)
\n
"
"-s --space=<dir> directory with dump tree (for export/import)
\n
"
"-i --import import large obj dump tree to DB
\n
"
"-i --import import large obj dump tree to DB
\n
"
"-e --export export (dump) large obj to dump tree
\n
"
"-e --export export (dump) large obj to dump tree
\n
"
...
@@ -295,6 +301,7 @@ usage()
...
@@ -295,6 +301,7 @@ usage()
"-p <password> password for connection to server
\n
"
"-p <password> password for connection to server
\n
"
"-d <database> database name
\n
"
"-d <database> database name
\n
"
"-t <hostname> server hostname
\n
"
"-t <hostname> server hostname
\n
"
"-o <port> database server port (default: 5432)
\n
"
"-s <dir> directory with dump tree (for export/import)
\n
"
"-s <dir> directory with dump tree (for export/import)
\n
"
"-i import large obj dump tree to DB
\n
"
"-i import large obj dump tree to DB
\n
"
"-e export (dump) large obj to dump tree
\n
"
"-e export (dump) large obj to dump tree
\n
"
...
...
contrib/pg_dumplo/pg_dumplo.h
View file @
d7a343d5
/* -------------------------------------------------------------------------
/* -------------------------------------------------------------------------
* pg_dumplo
* pg_dumplo
*
*
* $Header: /cvsroot/pgsql/contrib/pg_dumplo/Attic/pg_dumplo.h,v 1.
7 2001/11/05 17:46:23
momjian Exp $
* $Header: /cvsroot/pgsql/contrib/pg_dumplo/Attic/pg_dumplo.h,v 1.
8 2001/11/12 17:44:14
momjian Exp $
*
*
* Karel Zak 1999-2000
* Karel Zak 1999-2000
* -------------------------------------------------------------------------
* -------------------------------------------------------------------------
...
@@ -51,6 +51,7 @@ typedef struct
...
@@ -51,6 +51,7 @@ typedef struct
*
user
,
*
user
,
*
db
,
*
db
,
*
host
,
*
host
,
*
port
,
*
space
;
*
space
;
FILE
*
index
;
FILE
*
index
;
int
counter
,
int
counter
,
...
...
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