Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit81134af

Browse files
committed
Move pgbench from contrib/ to src/bin/
Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
1 parentb22a36a commit81134af

File tree

15 files changed

+60
-48
lines changed

15 files changed

+60
-48
lines changed

‎contrib/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ SUBDIRS = \
3838
pg_trgm\
3939
pg_upgrade\
4040
pg_upgrade_support\
41-
pgbench\
4241
pgcrypto\
4342
pgrowlocks\
4443
pgstattuple\

‎contrib/pgbench/Makefile

Lines changed: 0 additions & 33 deletions
This file was deleted.

‎doc/src/sgml/contrib.sgml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ pages.
187187
</para>
188188

189189
&oid2name;
190-
&pgbench;
191190
&vacuumlo;
192191
</sect1>
193192

‎doc/src/sgml/filelist.sgml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@
125125
<!ENTITY oid2name SYSTEM "oid2name.sgml">
126126
<!ENTITY pageinspect SYSTEM "pageinspect.sgml">
127127
<!ENTITY passwordcheck SYSTEM "passwordcheck.sgml">
128-
<!ENTITY pgbench SYSTEM "pgbench.sgml">
129128
<!ENTITY pgbuffercache SYSTEM "pgbuffercache.sgml">
130129
<!ENTITY pgcrypto SYSTEM "pgcrypto.sgml">
131130
<!ENTITY pgfreespacemap SYSTEM "pgfreespacemap.sgml">

‎doc/src/sgml/ref/allfiles.sgml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ Complete list of usable sgml source files in this directory.
181181
<!ENTITY initdb SYSTEM "initdb.sgml">
182182
<!ENTITY pgarchivecleanup SYSTEM "pgarchivecleanup.sgml">
183183
<!ENTITY pgBasebackup SYSTEM "pg_basebackup.sgml">
184+
<!ENTITY pgbench SYSTEM "pgbench.sgml">
184185
<!ENTITY pgConfig SYSTEM "pg_config-ref.sgml">
185186
<!ENTITY pgControldata SYSTEM "pg_controldata.sgml">
186187
<!ENTITY pgCtl SYSTEM "pg_ctl-ref.sgml">

‎doc/src/sgml/pgbench.sgmlrenamed to‎doc/src/sgml/ref/pgbench.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- doc/src/sgml/pgbench.sgml -->
1+
<!-- doc/src/sgml/ref/pgbench.sgml -->
22

33
<refentry id="pgbench">
44
<indexterm zone="pgbench">

‎doc/src/sgml/reference.sgml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@
230230
&dropuser;
231231
&ecpgRef;
232232
&pgBasebackup;
233+
&pgbench;
233234
&pgConfig;
234235
&pgDump;
235236
&pgDumpall;

‎src/bin/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ SUBDIRS = \
2323
pg_dump\
2424
pg_resetxlog\
2525
pg_rewind\
26+
pgbench\
2627
psql\
2728
scripts
2829

File renamed without changes.

‎src/bin/pgbench/Makefile

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# src/bin/pgbench/Makefile
2+
3+
PGFILEDESC = "pgbench - a simple program for running benchmark tests"
4+
PGAPPICON = win32
5+
6+
subdir = src/bin/pgbench
7+
top_builddir = ../../..
8+
include$(top_builddir)/src/Makefile.global
9+
10+
OBJS = pgbench.o exprparse.o$(WIN32RES)
11+
12+
overrideCPPFLAGS := -I. -I$(srcdir) -I$(libpq_srcdir)$(CPPFLAGS)
13+
14+
ifneq ($(PORTNAME), win32)
15+
overrideCFLAGS +=$(PTHREAD_CFLAGS)
16+
endif
17+
18+
19+
all: pgbench
20+
21+
pgbench:$(OBJS) | submake-libpq submake-libpgport
22+
$(CC)$(CFLAGS)$^$(libpq_pgport)$(PTHREAD_LIBS)$(LDFLAGS)$(LDFLAGS_EX)$(LIBS) -o$@$(X)
23+
24+
# exprscan is compiled as part of exprparse
25+
exprparse.o: exprscan.c
26+
27+
distprep: exprparse.c exprscan.c
28+
29+
install: all installdirs
30+
$(INSTALL_PROGRAM) pgbench$(X)'$(DESTDIR)$(bindir)/pgbench$(X)'
31+
32+
installdirs:
33+
$(MKDIR_P)'$(DESTDIR)$(bindir)'
34+
35+
uninstall:
36+
rm -f'$(DESTDIR)$(bindir)/pgbench$(X)'
37+
38+
cleandistclean:
39+
rm -f pgbench$(X)$(OBJS)
40+
41+
maintainer-clean: distclean
42+
rm -f exprparse.c exprscan.c
File renamed without changes.
File renamed without changes.

‎contrib/pgbench/pgbench.crenamed to‎src/bin/pgbench/pgbench.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* A simple benchmark program for PostgreSQL
55
* Originally written by Tatsuo Ishii and enhanced by many contributors.
66
*
7-
*contrib/pgbench/pgbench.c
7+
*src/bin/pgbench/pgbench.c
88
* Copyright (c) 2000-2015, PostgreSQL Global Development Group
99
* ALL RIGHTS RESERVED;
1010
*
File renamed without changes.

‎src/tools/msvc/Mkvcbuild.pm

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,42 +31,45 @@ my $libpq;
3131
# Set of variables for contrib modules
3232
my$contrib_defines = {'refint'=>'REFINT_VERBOSE' };
3333
my@contrib_uselibpq =
34-
('dblink','oid2name','pgbench','pg_upgrade','postgres_fdw','vacuumlo');
34+
('dblink','oid2name','pg_upgrade','postgres_fdw','vacuumlo');
3535
my@contrib_uselibpgport = (
36-
'oid2name','pgbench',
36+
'oid2name',
3737
'pg_standby',
3838
'pg_test_fsync','pg_test_timing',
3939
'pg_upgrade','pg_xlogdump',
4040
'vacuumlo');
4141
my@contrib_uselibpgcommon = (
42-
'oid2name','pgbench',
42+
'oid2name',
4343
'pg_standby',
4444
'pg_test_fsync','pg_test_timing',
4545
'pg_upgrade','pg_xlogdump',
4646
'vacuumlo');
47-
my$contrib_extralibs ={'pgbench'=> ['ws2_32.lib'] };
47+
my$contrib_extralibs =undef;
4848
my$contrib_extraincludes =
4949
{'tsearch2'=> ['contrib/tsearch2'],'dblink'=> ['src/backend'] };
5050
my$contrib_extrasource = {
5151
'cube'=> ['contrib\cube\cubescan.l','contrib\cube\cubeparse.y' ],
52-
'pgbench'=>
53-
['contrib\pgbench\exprscan.l','contrib\pgbench\exprparse.y' ],
5452
'seg'=> ['contrib\seg\segscan.l','contrib\seg\segparse.y' ], };
5553
my@contrib_excludes = ('pgcrypto','intagg','sepgsql');
5654

5755
# Set of variables for frontend modules
5856
my$frontend_defines = {'initdb'=>'FRONTEND' };
59-
my@frontend_uselibpq = ('pg_ctl','psql');
60-
my@frontend_uselibpgport = ('pg_archivecleanup' );
61-
my@frontend_uselibpgcommon = ('pg_archivecleanup' );
57+
my@frontend_uselibpq = ('pg_ctl','pgbench','psql');
58+
my@frontend_uselibpgport = ('pg_archivecleanup','pgbench' );
59+
my@frontend_uselibpgcommon = ('pg_archivecleanup','pgbench' );
6260
my$frontend_extralibs = {
6361
'initdb'=> ['ws2_32.lib'],
6462
'pg_restore'=> ['ws2_32.lib'],
63+
'pgbench'=> ['ws2_32.lib'],
6564
'psql'=> ['ws2_32.lib'] };
6665
my$frontend_extraincludes = {
6766
'initdb'=> ['src\timezone'],
6867
'psql'=> ['src\bin\pg_dump','src\backend' ] };
69-
my$frontend_extrasource = {'psql'=> ['src\bin\psql\psqlscan.l'] };
68+
my$frontend_extrasource = {
69+
'psql'=> ['src\bin\psql\psqlscan.l'],
70+
'pgbench'=>
71+
['contrib\pgbench\exprscan.l','contrib\pgbench\exprparse.y' ],
72+
};
7073
my@frontend_excludes =
7174
('pgevent','pg_basebackup','pg_rewind','pg_dump','scripts');
7275

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp