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
c8226429
Commit
c8226429
authored
Aug 04, 2006
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some basic tests of GUC behavior.
Joachim Wieland
parent
7946f772
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
222 additions
and
4 deletions
+222
-4
src/test/regress/expected/guc.out
src/test/regress/expected/guc.out
+150
-0
src/test/regress/parallel_schedule
src/test/regress/parallel_schedule
+2
-2
src/test/regress/serial_schedule
src/test/regress/serial_schedule
+3
-2
src/test/regress/sql/guc.sql
src/test/regress/sql/guc.sql
+67
-0
No files found.
src/test/regress/expected/guc.out
0 → 100644
View file @
c8226429
-- SET vacuum_cost_delay to some value
SET vacuum_cost_delay TO 400;
SHOW vacuum_cost_delay;
vacuum_cost_delay
-------------------
400ms
(1 row)
-- SET LOCAL has no effect outside of a transaction
SET LOCAL vacuum_cost_delay TO 500;
SHOW vacuum_cost_delay;
vacuum_cost_delay
-------------------
400ms
(1 row)
-- SET LOCAL within a transaction that commits
BEGIN;
SET LOCAL vacuum_cost_delay TO 500;
SHOW vacuum_cost_delay;
vacuum_cost_delay
-------------------
500ms
(1 row)
COMMIT;
SHOW vacuum_cost_delay;
vacuum_cost_delay
-------------------
400ms
(1 row)
-- SET should be reverted after ROLLBACK
BEGIN;
SET vacuum_cost_delay TO 600;
SHOW vacuum_cost_delay;
vacuum_cost_delay
-------------------
600ms
(1 row)
ROLLBACK;
SHOW vacuum_cost_delay;
vacuum_cost_delay
-------------------
400ms
(1 row)
-- Some tests with subtransactions
BEGIN;
SET vacuum_cost_delay TO 700;
SAVEPOINT first_sp;
SET vacuum_cost_delay TO 800;
ROLLBACK TO first_sp;
SHOW vacuum_cost_delay;
vacuum_cost_delay
-------------------
700ms
(1 row)
SAVEPOINT second_sp;
SET vacuum_cost_delay TO 900;
SAVEPOINT third_sp;
SET vacuum_cost_delay TO 1000;
SHOW vacuum_cost_delay;
vacuum_cost_delay
-------------------
1s
(1 row)
ROLLBACK TO third_sp;
SHOW vacuum_cost_delay;
vacuum_cost_delay
-------------------
900ms
(1 row)
ROLLBACK TO second_sp;
SHOW vacuum_cost_delay;
vacuum_cost_delay
-------------------
700ms
(1 row)
ROLLBACK;
-- SET LOCAL with Savepoints
BEGIN;
SHOW vacuum_cost_delay;
vacuum_cost_delay
-------------------
400ms
(1 row)
SAVEPOINT sp;
SET LOCAL vacuum_cost_delay TO 300;
SHOW vacuum_cost_delay;
vacuum_cost_delay
-------------------
300ms
(1 row)
ROLLBACK TO sp;
SHOW vacuum_cost_delay;
vacuum_cost_delay
-------------------
400ms
(1 row)
ROLLBACK;
-- SET followed by SET LOCAL
BEGIN;
SET vacuum_cost_delay TO 400;
SET LOCAL vacuum_cost_delay TO 500;
SHOW vacuum_cost_delay;
vacuum_cost_delay
-------------------
500ms
(1 row)
COMMIT;
SHOW vacuum_cost_delay;
vacuum_cost_delay
-------------------
400ms
(1 row)
--
-- Test RESET. We use datestyle because the reset value is forced by
-- pg_regress, so it doesn't depend on the installation's configuration.
--
SHOW datestyle;
DateStyle
---------------
Postgres, MDY
(1 row)
SET datestyle = iso, ymd;
SHOW datestyle;
DateStyle
-----------
ISO, YMD
(1 row)
RESET datestyle;
SHOW datestyle;
DateStyle
---------------
Postgres, MDY
(1 row)
src/test/regress/parallel_schedule
View file @
c8226429
# ----------
# The first group of parallel test
# $PostgreSQL: pgsql/src/test/regress/parallel_schedule,v 1.3
2 2006/03/11 04:38:41 momjian
Exp $
# $PostgreSQL: pgsql/src/test/regress/parallel_schedule,v 1.3
3 2006/08/04 00:00:13 tgl
Exp $
# ----------
test: boolean char name varchar text int2 int4 int8 oid float4 float8 bit numeric
...
...
@@ -69,7 +69,7 @@ test: misc
# ----------
# The fifth group of parallel test
# ----------
test: select_views portals_p2 rules foreign_key cluster dependency
test: select_views portals_p2 rules foreign_key cluster dependency
guc
# ----------
# The sixth group of parallel test
...
...
src/test/regress/serial_schedule
View file @
c8226429
# $PostgreSQL: pgsql/src/test/regress/serial_schedule,v 1.3
0 2006/01/22 05:20:34 neilc
Exp $
# $PostgreSQL: pgsql/src/test/regress/serial_schedule,v 1.3
1 2006/08/04 00:00:13 tgl
Exp $
# This should probably be in an order similar to parallel_schedule.
test: boolean
test: char
...
...
@@ -84,6 +84,8 @@ test: portals_p2
test: rules
test: foreign_key
test: cluster
test: dependency
test: guc
test: limit
test: plpgsql
test: copy2
...
...
@@ -100,4 +102,3 @@ test: polymorphism
test: rowtypes
test: stats
test: tablespace
test: dependency
src/test/regress/sql/guc.sql
0 → 100644
View file @
c8226429
-- SET vacuum_cost_delay to some value
SET
vacuum_cost_delay
TO
400
;
SHOW
vacuum_cost_delay
;
-- SET LOCAL has no effect outside of a transaction
SET
LOCAL
vacuum_cost_delay
TO
500
;
SHOW
vacuum_cost_delay
;
-- SET LOCAL within a transaction that commits
BEGIN
;
SET
LOCAL
vacuum_cost_delay
TO
500
;
SHOW
vacuum_cost_delay
;
COMMIT
;
SHOW
vacuum_cost_delay
;
-- SET should be reverted after ROLLBACK
BEGIN
;
SET
vacuum_cost_delay
TO
600
;
SHOW
vacuum_cost_delay
;
ROLLBACK
;
SHOW
vacuum_cost_delay
;
-- Some tests with subtransactions
BEGIN
;
SET
vacuum_cost_delay
TO
700
;
SAVEPOINT
first_sp
;
SET
vacuum_cost_delay
TO
800
;
ROLLBACK
TO
first_sp
;
SHOW
vacuum_cost_delay
;
SAVEPOINT
second_sp
;
SET
vacuum_cost_delay
TO
900
;
SAVEPOINT
third_sp
;
SET
vacuum_cost_delay
TO
1000
;
SHOW
vacuum_cost_delay
;
ROLLBACK
TO
third_sp
;
SHOW
vacuum_cost_delay
;
ROLLBACK
TO
second_sp
;
SHOW
vacuum_cost_delay
;
ROLLBACK
;
-- SET LOCAL with Savepoints
BEGIN
;
SHOW
vacuum_cost_delay
;
SAVEPOINT
sp
;
SET
LOCAL
vacuum_cost_delay
TO
300
;
SHOW
vacuum_cost_delay
;
ROLLBACK
TO
sp
;
SHOW
vacuum_cost_delay
;
ROLLBACK
;
-- SET followed by SET LOCAL
BEGIN
;
SET
vacuum_cost_delay
TO
400
;
SET
LOCAL
vacuum_cost_delay
TO
500
;
SHOW
vacuum_cost_delay
;
COMMIT
;
SHOW
vacuum_cost_delay
;
--
-- Test RESET. We use datestyle because the reset value is forced by
-- pg_regress, so it doesn't depend on the installation's configuration.
--
SHOW
datestyle
;
SET
datestyle
=
iso
,
ymd
;
SHOW
datestyle
;
RESET
datestyle
;
SHOW
datestyle
;
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