mirror of
https://github.com/postgres/postgres.git
synced 2025-12-07 12:02:30 +03:00
The attached patch fixes some spelling mistakes, makes the
comments on one of the optimizer functions a lot more clear, adds a summary of the recent KSQO discussion to the comments in the code, adds regression tests for the bug with sequence state Tom fixed recently and another reg. test, and removes some PostQuel legacy stuff: ExecAppend -> ExecInsert, ExecRetrieve -> ExecSelect, etc. Error messages remain unchanged until a vote. Neil Conway
This commit is contained in:
@@ -151,3 +151,13 @@ SELECT * FROM serialTest;
|
||||
force | 100
|
||||
(3 rows)
|
||||
|
||||
CREATE SEQUENCE sequence_test;
|
||||
BEGIN;
|
||||
SELECT nextval('sequence_test');
|
||||
nextval
|
||||
---------
|
||||
1
|
||||
(1 row)
|
||||
|
||||
DROP SEQUENCE sequence_test;
|
||||
END;
|
||||
|
||||
@@ -21,6 +21,15 @@ SELECT b, c FROM test_having
|
||||
3 | bbbb
|
||||
(2 rows)
|
||||
|
||||
-- HAVING is equivalent to WHERE in this case
|
||||
SELECT b, c FROM test_having
|
||||
GROUP BY b, c HAVING b = 3;
|
||||
b | c
|
||||
---+----------
|
||||
3 | BBBB
|
||||
3 | bbbb
|
||||
(2 rows)
|
||||
|
||||
SELECT lower(c), count(c) FROM test_having
|
||||
GROUP BY lower(c) HAVING count(*) > 2 OR min(a) = max(a);
|
||||
lower | count
|
||||
|
||||
@@ -217,3 +217,10 @@ INSERT INTO serialTest VALUES ('force', 100);
|
||||
INSERT INTO serialTest VALUES ('wrong', NULL);
|
||||
|
||||
SELECT * FROM serialTest;
|
||||
|
||||
CREATE SEQUENCE sequence_test;
|
||||
|
||||
BEGIN;
|
||||
SELECT nextval('sequence_test');
|
||||
DROP SEQUENCE sequence_test;
|
||||
END;
|
||||
|
||||
@@ -18,6 +18,10 @@ INSERT INTO test_having VALUES (9, 4, 'CCCC', 'j');
|
||||
SELECT b, c FROM test_having
|
||||
GROUP BY b, c HAVING count(*) = 1;
|
||||
|
||||
-- HAVING is equivalent to WHERE in this case
|
||||
SELECT b, c FROM test_having
|
||||
GROUP BY b, c HAVING b = 3;
|
||||
|
||||
SELECT lower(c), count(c) FROM test_having
|
||||
GROUP BY lower(c) HAVING count(*) > 2 OR min(a) = max(a);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user