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
bf023bd1
Commit
bf023bd1
authored
Feb 20, 2000
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a simple regress test for SERIAL --- it's not much,
but it's better than no test at all...
parent
37a71f90
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
2 deletions
+37
-2
src/test/regress/expected/create_misc.out
src/test/regress/expected/create_misc.out
+19
-0
src/test/regress/expected/sanity_check.out
src/test/regress/expected/sanity_check.out
+2
-1
src/test/regress/output/misc.source
src/test/regress/output/misc.source
+3
-1
src/test/regress/sql/create_misc.sql
src/test/regress/sql/create_misc.sql
+13
-0
No files found.
src/test/regress/expected/create_misc.out
View file @
bf023bd1
...
...
@@ -149,3 +149,22 @@ INSERT INTO iportaltest (i, d, p)
VALUES (1, 3.567, '(3.0,1.0),(4.0,2.0)'::polygon);
INSERT INTO iportaltest (i, d, p)
VALUES (2, 89.05, '(4.0,2.0),(3.0,1.0)'::polygon);
---
--- test creation of SERIAL column
---
CREATE TABLE serialTest (f1 text, f2 serial);
NOTICE: CREATE TABLE will create implicit sequence 'serialtest_f2_seq' for SERIAL column 'serialtest.f2'
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'serialtest_f2_key' for table 'serialtest'
INSERT INTO serialTest VALUES ('foo');
INSERT INTO serialTest VALUES ('bar');
INSERT INTO serialTest VALUES ('force', 100);
INSERT INTO serialTest VALUES ('wrong', NULL);
ERROR: ExecAppend: Fail to add null value in not null attribute f2
SELECT * FROM serialTest;
f1 | f2
-------+-----
foo | 1
bar | 2
force | 100
(3
rows)
src/test/regress/expected/sanity_check.out
View file @
bf023bd1
...
...
@@ -49,8 +49,9 @@ SELECT relname, relhasindex
pg_trigger | t
pg_type | t
road | t
serialtest | t
shighway | t
tenk1 | t
tenk2 | t
(4
3
rows)
(4
4
rows)
src/test/regress/output/misc.source
View file @
bf023bd1
...
...
@@ -607,6 +607,8 @@ SELECT user_relns() AS user_relns
real_city
reltime_tbl
road
serialtest
serialtest_f2_seq
shighway
slow_emp4000
street
...
...
@@ -621,7 +623,7 @@ SELECT user_relns() AS user_relns
toyemp
varchar_tbl
xacttest
(8
4
rows)
(8
6
rows)
--SELECT name(equipment(hobby_construct(text 'skywalking', text 'mer'))) AS equip_name;
--
...
...
src/test/regress/sql/create_misc.sql
View file @
bf023bd1
...
...
@@ -228,3 +228,16 @@ INSERT INTO iportaltest (i, d, p)
INSERT
INTO
iportaltest
(
i
,
d
,
p
)
VALUES
(
2
,
89
.
05
,
'(4.0,2.0),(3.0,1.0)'
::
polygon
);
---
--- test creation of SERIAL column
---
CREATE
TABLE
serialTest
(
f1
text
,
f2
serial
);
INSERT
INTO
serialTest
VALUES
(
'foo'
);
INSERT
INTO
serialTest
VALUES
(
'bar'
);
INSERT
INTO
serialTest
VALUES
(
'force'
,
100
);
INSERT
INTO
serialTest
VALUES
(
'wrong'
,
NULL
);
SELECT
*
FROM
serialTest
;
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