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
ecc198bd
Commit
ecc198bd
authored
May 19, 2004
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-add elog() to exec.c, per Tom.
parent
ba71d824
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
22 deletions
+45
-22
src/bin/initdb/Makefile
src/bin/initdb/Makefile
+7
-3
src/bin/pg_dump/Makefile
src/bin/pg_dump/Makefile
+8
-4
src/bin/psql/Makefile
src/bin/psql/Makefile
+7
-3
src/interfaces/ecpg/preproc/Makefile
src/interfaces/ecpg/preproc/Makefile
+7
-3
src/port/exec.c
src/port/exec.c
+16
-9
No files found.
src/bin/initdb/Makefile
View file @
ecc198bd
...
...
@@ -5,7 +5,7 @@
# Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
# $PostgreSQL: pgsql/src/bin/initdb/Makefile,v 1.
39 2004/05/18 20:18:58
momjian Exp $
# $PostgreSQL: pgsql/src/bin/initdb/Makefile,v 1.
40 2004/05/19 17:15:20
momjian Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -15,13 +15,17 @@ include $(top_builddir)/src/Makefile.global
override CPPFLAGS
:
= -DFRONTEND -I$(libpq_srcdir) $(CPPFLAGS)
OBJS
=
initdb.o
OBJS
=
initdb.o
\
$(
filter
exec.o,
$(LIBOBJS)
)
all
:
submake-libpq submake-libpgport initdb
initdb
:
$(OBJS) $(libpq_builddir)/libpq.a
$(CC)
$(CFLAGS)
$(OBJS)
$(libpq)
$(LDFLAGS)
$(LIBS)
-o
$@$(X)
exec.c
:
% : $(top_srcdir)/src/port/%
rm
-f
$@
&&
$(LN_S)
$<
.
install
:
all installdirs
$(INSTALL_PROGRAM)
initdb
$(X)
$(DESTDIR)$(bindir)
/initdb
$(X)
...
...
@@ -32,7 +36,7 @@ uninstall:
rm
-f
$(DESTDIR)$(bindir)
/initdb
$(X)
clean distclean maintainer-clean
:
rm
-f
initdb
$(X)
$(OBJS)
rm
-f
initdb
$(X)
$(OBJS)
exec.c
# ensure that changes in datadir propagate into object file
...
...
src/bin/pg_dump/Makefile
View file @
ecc198bd
...
...
@@ -5,7 +5,7 @@
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.4
8 2004/05/18 20:18:58
momjian Exp $
# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.4
9 2004/05/19 17:15:20
momjian Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -18,6 +18,7 @@ override CPPFLAGS += -DFRONTEND
OBJS
=
pg_backup_archiver.o pg_backup_db.o pg_backup_custom.o
\
pg_backup_files.o pg_backup_null.o pg_backup_tar.o
\
dumputils.o
PG_DUMPALL_OBJS
=
$(
filter
exec.o,
$(LIBOBJS)
)
EXTRA_OBJS
=
$(top_builddir)
/src/backend/parser/keywords.o
...
...
@@ -32,8 +33,11 @@ pg_dump: pg_dump.o common.o pg_dump_sort.o $(OBJS) $(libpq_builddir)/libpq.a
pg_restore
:
pg_restore.o $(OBJS) $(libpq_builddir)/libpq.a
$(CC)
$(CFLAGS)
pg_restore.o
$(OBJS)
$(EXTRA_OBJS)
$(libpq)
$(LDFLAGS)
$(LIBS)
-o
$@$(X)
pg_dumpall
:
pg_dumpall.o dumputils.o $(libpq_builddir)/libpq.a
$(CC)
$(CFLAGS)
pg_dumpall.o dumputils.o
$(EXTRA_OBJS)
$(libpq)
$(LDFLAGS)
$(LIBS)
-o
$@$(X)
pg_dumpall
:
pg_dumpall.o dumputils.o $(PG_DUMPALL_OBJS) $(libpq_builddir)/libpq.a
$(CC)
$(CFLAGS)
pg_dumpall.o dumputils.o
$(PG_DUMPALL_OBJS)
$(EXTRA_OBJS)
$(libpq)
$(LDFLAGS)
$(LIBS)
-o
$@$(X)
exec.c
:
% : $(top_srcdir)/src/port/%
rm
-f
$@
&&
$(LN_S)
$<
.
.PHONY
:
submake-backend
submake-backend
:
...
...
@@ -52,4 +56,4 @@ uninstall:
rm
-f
$(
addprefix
$(DESTDIR)$(bindir)
/, pg_dump
$(X)
pg_restore
$(X)
pg_dumpall
$(X)
)
clean distclean maintainer-clean
:
rm
-f
pg_dump
$(X)
pg_restore
$(X)
pg_dumpall
$(X)
$(OBJS)
pg_dump.o common.o pg_dump_sort.o pg_restore.o pg_dumpall.o
rm
-f
pg_dump
$(X)
pg_restore
$(X)
pg_dumpall
$(X)
$(OBJS)
pg_dump.o common.o pg_dump_sort.o pg_restore.o pg_dumpall.o
exec.c
src/bin/psql/Makefile
View file @
ecc198bd
...
...
@@ -5,7 +5,7 @@
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
# $PostgreSQL: pgsql/src/bin/psql/Makefile,v 1.4
5 2004/05/18 20:18:58
momjian Exp $
# $PostgreSQL: pgsql/src/bin/psql/Makefile,v 1.4
6 2004/05/19 17:15:21
momjian Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -19,7 +19,8 @@ override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS) -DFRONTEND
OBJS
=
command.o common.o help.o input.o stringutils.o mainloop.o copy.o
\
startup.o prompt.o variables.o large_obj.o print.o describe.o
\
psqlscan.o tab-complete.o mbprint.o
psqlscan.o tab-complete.o mbprint.o
\
$(
filter
exec.o,
$(LIBOBJS)
)
FLEXFLAGS
=
-Cfe
...
...
@@ -29,6 +30,9 @@ all: submake-libpq submake-libpgport psql
psql
:
$(OBJS) $(libpq_builddir)/libpq.a
$(CC)
$(CFLAGS)
$(OBJS)
$(libpq)
$(LDFLAGS)
$(LIBS)
-o
$@$(X)
exec.c
:
% : $(top_srcdir)/src/port/%
rm
-f
$@
&&
$(LN_S)
$<
.
help.o
:
$(srcdir)/sql_help.h
ifdef
PERL
...
...
@@ -60,7 +64,7 @@ uninstall:
# psqlscan.c is in the distribution tarball, so is not cleaned here
clean distclean
:
rm
-f
psql
$(X)
$(OBJS)
rm
-f
psql
$(X)
$(OBJS)
exec.c
maintainer-clean
:
distclean
rm
-f
$(srcdir)
/sql_help.h
$(srcdir)
/psqlscan.c
src/interfaces/ecpg/preproc/Makefile
View file @
ecc198bd
# $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.10
5 2004/05/18 20:18:58
momjian Exp $
# $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.10
6 2004/05/19 17:15:21
momjian Exp $
subdir
=
src/interfaces/ecpg/preproc
top_builddir
=
../../../..
...
...
@@ -19,13 +19,17 @@ endif
override
CFLAGS
+=
$(PTHREAD_CFLAGS)
OBJS
=
preproc.o type.o ecpg.o ecpg_keywords.o output.o
\
keywords.o c_keywords.o ../ecpglib/typename.o descriptor.o variable.o
keywords.o c_keywords.o ../ecpglib/typename.o descriptor.o variable.o
\
$(
filter
exec.o,
$(LIBOBJS)
)
all
:
submake-libpgport ecpg
ecpg
:
$(OBJS)
$(CC)
$(CFLAGS)
$(LDFLAGS)
$^
$(LIBS)
$(PTHREAD_LIBS)
-o
$@$(X)
exec.c
:
% : $(top_srcdir)/src/port/%
rm
-f
$@
&&
$(LN_S)
$<
.
# pgc is compiled as part of preproc
preproc.o
:
$(srcdir)/pgc.c
...
...
@@ -62,7 +66,7 @@ uninstall:
rm
-f
$(DESTDIR)$(bindir)
/ecpg
$(X)
clean distclean
:
rm
-f
*
.o ecpg
$(X)
rm
-f
*
.o ecpg
$(X)
exec.c
# garbage from partial builds
@rm
-f
y.tab.c
y.tab.h
# garbage from development
...
...
src/port/exec.c
View file @
ecc198bd
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/port/exec.c,v 1.
9 2004/05/19 04:36:33
momjian Exp $
* $PostgreSQL: pgsql/src/port/exec.c,v 1.
10 2004/05/19 17:15:21
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -48,6 +48,13 @@
#define S_IXOTH ((S_IXUSR)>>6)
#endif
#ifndef FRONTEND
/* We use only 3-parameter elog calls in this file, for simplicity */
#define log_error(str, param) elog(LOG, (str), (param))
#else
#define log_error(str, param) fprintf(stderr, (str), (param))
#endif
static
void
win32_make_absolute
(
char
*
path
);
/*
...
...
@@ -192,7 +199,7 @@ find_my_exec(const char *argv0, char *full_path)
{
if
(
*++
p
==
'\0'
)
{
fprintf
(
stderr
,
"argv[0] ends with a path separator
\"
%s
\"
"
,
argv0
);
log_error
(
"argv[0] ends with a path separator
\"
%s
\"
"
,
argv0
);
return
-
1
;
}
if
(
is_absolute_path
(
argv0
)
||
!
getcwd
(
buf
,
MAXPGPATH
))
...
...
@@ -208,7 +215,7 @@ find_my_exec(const char *argv0, char *full_path)
}
else
{
fprintf
(
stderr
,
"invalid binary
\"
%s
\"
"
,
buf
);
log_error
(
"invalid binary
\"
%s
\"
"
,
buf
);
return
-
1
;
}
}
...
...
@@ -245,7 +252,7 @@ find_my_exec(const char *argv0, char *full_path)
case
-
1
:
/* wasn't even a candidate, keep looking */
break
;
case
-
2
:
/* found but disqualified */
fprintf
(
stderr
,
"could not read binary
\"
%s
\"
"
,
buf
);
log_error
(
"could not read binary
\"
%s
\"
"
,
buf
);
free
(
path
);
return
-
1
;
}
...
...
@@ -255,7 +262,7 @@ find_my_exec(const char *argv0, char *full_path)
free
(
path
);
}
fprintf
(
stderr
,
"could not find a
\"
%s
\"
to execute"
,
argv0
);
log_error
(
"could not find a
\"
%s
\"
to execute"
,
argv0
);
return
-
1
;
#if 0
...
...
@@ -337,17 +344,17 @@ pclose_check(FILE *stream)
}
else
if
(
WIFEXITED
(
exitstatus
))
{
fprintf
(
stderr
,
_
(
"child process exited with exit code %d
\n
"
),
log_error
(
_
(
"child process exited with exit code %d
\n
"
),
WEXITSTATUS
(
exitstatus
));
}
else
if
(
WIFSIGNALED
(
exitstatus
))
{
fprintf
(
stderr
,
_
(
"child process was terminated by signal %d
\n
"
),
log_error
(
_
(
"child process was terminated by signal %d
\n
"
),
WTERMSIG
(
exitstatus
));
}
else
{
fprintf
(
stderr
,
_
(
"child process exited with unrecognized status %d
\n
"
),
log_error
(
_
(
"child process exited with unrecognized status %d
\n
"
),
exitstatus
);
}
...
...
@@ -369,7 +376,7 @@ win32_make_absolute(char *path)
if
(
_fullpath
(
abspath
,
path
,
MAXPGPATH
)
==
NULL
)
{
fprintf
(
stderr
,
"Win32 path expansion failed: %s"
,
strerror
(
errno
));
log_error
(
"Win32 path expansion failed: %s"
,
strerror
(
errno
));
StrNCpy
(
abspath
,
path
,
MAXPGPATH
);
}
canonicalize_path
(
abspath
);
...
...
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