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
dfdb2e5f
Commit
dfdb2e5f
authored
Feb 23, 1999
by
Thomas G. Lockhart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove non-portable queries by replacing getpgusername() with a constant
string.
parent
4aa0e645
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
11 deletions
+15
-11
src/test/regress/expected/rules.out
src/test/regress/expected/rules.out
+10
-10
src/test/regress/sql/rules.sql
src/test/regress/sql/rules.sql
+5
-1
No files found.
src/test/regress/expected/rules.out
View file @
dfdb2e5f
...
...
@@ -944,14 +944,14 @@ QUERY: CREATE RULE log_shoelace AS ON UPDATE TO shoelace_data
DO INSERT INTO shoelace_log VALUES (
NEW.sl_name,
NEW.sl_avail,
getpgusername()
,
'Al Bundy'
,
'epoch'::text
);
QUERY: UPDATE shoelace_data SET sl_avail = 6 WHERE sl_name = 'sl7';
QUERY: SELECT * FROM shoelace_log;
sl_name |sl_avail|log_who|log_when
----------+--------+-------+--------
sl7 | 6|
postgres
|epoch
sl_name |sl_avail|log_who
|log_when
----------+--------+-------
-
+--------
sl7 | 6|
Al Bundy
|epoch
(1 row)
QUERY: CREATE RULE shoelace_ins AS ON INSERT TO shoelace
...
...
@@ -1019,12 +1019,12 @@ sl6 | 20|brown | 0.9|m | 90
(8 rows)
QUERY: SELECT * FROM shoelace_log;
sl_name |sl_avail|log_who|log_when
----------+--------+-------+--------
sl7 | 6|
postgres
|epoch
sl3 | 10|
postgres
|epoch
sl6 | 20|
postgres
|epoch
sl8 | 21|
postgres
|epoch
sl_name |sl_avail|log_who
|log_when
----------+--------+-------
-
+--------
sl7 | 6|
Al Bundy
|epoch
sl3 | 10|
Al Bundy
|epoch
sl6 | 20|
Al Bundy
|epoch
sl8 | 21|
Al Bundy
|epoch
(4 rows)
QUERY: CREATE VIEW shoelace_obsolete AS
...
...
src/test/regress/sql/rules.sql
View file @
dfdb2e5f
...
...
@@ -594,12 +594,16 @@ SELECT * FROM shoe_ready WHERE total_avail >= 2;
log_when
datetime
-- when
);
-- Want "log_who" to be CURRENT_USER,
-- but that is non-portable for the regression test
-- - thomas 1999-02-21
CREATE
RULE
log_shoelace
AS
ON
UPDATE
TO
shoelace_data
WHERE
NEW
.
sl_avail
!=
OLD
.
sl_avail
DO
INSERT
INTO
shoelace_log
VALUES
(
NEW
.
sl_name
,
NEW
.
sl_avail
,
getpgusername
()
,
'Al Bundy'
,
'epoch'
::
text
);
...
...
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