-
Notifications
You must be signed in to change notification settings - Fork 0
/
semver_test_select_where.sql
executable file
·27 lines (21 loc) · 1.15 KB
/
semver_test_select_where.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
LOAD 'pg_semver';
CREATE TABLE versions(version SEMVER);
INSERT INTO versions VALUES ('1.0.0'), ('0.0.0'), ('1.1.0'), ('1.2.0'), ('1.23.0'), ('1.23.9'), ('2.9.0'), ('2.0.12'),
('2.0.0-alpha.0'), ('3.0.1'), ('3.0.2'), ('3.0.4-beta.2'), ('3.0.4-alpha.0'),
('3.0.4-rc.1'), ('1.5.0'), ('1.05.0'), ('1.005.0');
SELECT * FROM versions WHERE version = '1.5.0';
SELECT * FROM versions WHERE version != '1.5.0';
SELECT * FROM versions WHERE version <> '1.5.0';
SELECT * FROM versions WHERE version > '1.5.0';
SELECT * FROM versions WHERE version >= '1.5.0';
SELECT * FROM versions WHERE version < '1.5.0';
SELECT * FROM versions WHERE version <= '1.5.0';
SELECT * FROM versions WHERE version = '2.0.0-alpha';
SELECT * FROM versions WHERE version != '2.0.0-alpha';
SELECT * FROM versions WHERE version <> '2.0.0-alpha';
SELECT * FROM versions WHERE version > '2.0.0-alpha';
SELECT * FROM versions WHERE version >= '2.0.0-alpha';
SELECT * FROM versions WHERE version < '2.0.0-alpha';
SELECT * FROM versions WHERE version <= '2.0.0-alpha';
SELECT * FROM versions WHERE version > '2.9-beta1';
DROP TABLE IF EXISTS versions;