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
2c48b3db
Commit
2c48b3db
authored
Jul 18, 2002
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
here are the copy2.sql and copy2.out files for the new regression
tests Brent Verner
parent
a90db34b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
101 additions
and
0 deletions
+101
-0
src/test/regress/expected/copy2.out
src/test/regress/expected/copy2.out
+45
-0
src/test/regress/sql/copy2.sql
src/test/regress/sql/copy2.sql
+56
-0
No files found.
src/test/regress/expected/copy2.out
0 → 100644
View file @
2c48b3db
CREATE TABLE x (
a serial,
b int,
c text not null default 'stuff',
d text not null,
e text
);
NOTICE: CREATE TABLE will create implicit sequence 'x_a_seq' for SERIAL column 'x.a'
NOTICE: CREATE TABLE / UNIQUE will create implicit index 'x_a_key' for table 'x'
CREATE FUNCTION fn_x_before () RETURNS OPAQUE AS '
BEGIN
NEW.e := ''before trigger fired''::text;
return NEW;
END;
' language 'plpgsql';
CREATE FUNCTION fn_x_after () RETURNS OPAQUE AS '
BEGIN
UPDATE x set e=''after trigger fired'' where c=''stuff'';
return NULL;
END;
' language 'plpgsql';
CREATE TRIGGER trg_x_after AFTER INSERT ON x
FOR EACH ROW EXECUTE PROCEDURE fn_x_after();
CREATE TRIGGER trg_x_before BEFORE INSERT ON x
FOR EACH ROW EXECUTE PROCEDURE fn_x_before();
COPY x (a,b,c,d,e) from stdin;
COPY x (b,d) from stdin;
COPY x (b,d) from stdin;
COPY x (a,b,c,d,e) from stdin;
COPY x TO stdout;
10000 21 31 41 before trigger fired
10001 22 32 42 before trigger fired
10002 23 33 43 before trigger fired
10003 24 34 44 before trigger fired
10004 25 35 45 before trigger fired
10005 26 36 46 before trigger fired
1 1 stuff test_1 after trigger fired
2 2 stuff test_2 after trigger fired
3 3 stuff test_3 after trigger fired
4 4 stuff test_4 after trigger fired
5 5 stuff test_5 after trigger fired
DROP TABLE x;
DROP SEQUENCE x_a_seq;
DROP FUNCTION fn_x_before();
DROP FUNCTION fn_x_after();
src/test/regress/sql/copy2.sql
0 → 100644
View file @
2c48b3db
CREATE
TABLE
x
(
a
serial
,
b
int
,
c
text
not
null
default
'stuff'
,
d
text
not
null
,
e
text
);
CREATE
FUNCTION
fn_x_before
()
RETURNS
OPAQUE
AS
'
BEGIN
NEW.e :=
''
before trigger fired
''
::text;
return NEW;
END;
'
language
'plpgsql'
;
CREATE
FUNCTION
fn_x_after
()
RETURNS
OPAQUE
AS
'
BEGIN
UPDATE x set e=
''
after trigger fired
''
where c=
''
stuff
''
;
return NULL;
END;
'
language
'plpgsql'
;
CREATE
TRIGGER
trg_x_after
AFTER
INSERT
ON
x
FOR
EACH
ROW
EXECUTE
PROCEDURE
fn_x_after
();
CREATE
TRIGGER
trg_x_before
BEFORE
INSERT
ON
x
FOR
EACH
ROW
EXECUTE
PROCEDURE
fn_x_before
();
COPY
x
(
a
,
b
,
c
,
d
,
e
)
from
stdin
;
10000
21
31
41
51
\
.
COPY
x
(
b
,
d
)
from
stdin
;
1
test_1
\
.
COPY
x
(
b
,
d
)
from
stdin
;
2
test_2
3
test_3
4
test_4
5
test_5
\
.
COPY
x
(
a
,
b
,
c
,
d
,
e
)
from
stdin
;
10001
22
32
42
52
10002
23
33
43
53
10003
24
34
44
54
10004
25
35
45
55
10005
26
36
46
56
\
.
COPY
x
TO
stdout
;
DROP
TABLE
x
;
DROP
SEQUENCE
x_a_seq
;
DROP
FUNCTION
fn_x_before
();
DROP
FUNCTION
fn_x_after
();
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