create_table.sql.patch 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. --- create_table.sql 2023-07-24 18:02:30.058334000 +0300
  2. +++ create_table.sql 2023-07-27 11:26:22.063095000 +0300
  3. @@ -256,21 +256,7 @@
  4. -- invalid: non-lowercase quoted reloptions identifiers
  5. CREATE TABLE tas_case WITH ("Fillfactor" = 10) AS SELECT 1 a;
  6. -CREATE UNLOGGED TABLE unlogged1 (a int primary key); -- OK
  7. -CREATE TEMPORARY TABLE unlogged2 (a int primary key); -- OK
  8. -SELECT relname, relkind, relpersistence FROM pg_class WHERE relname ~ '^unlogged\d' ORDER BY relname;
  9. -REINDEX INDEX unlogged1_pkey;
  10. -REINDEX INDEX unlogged2_pkey;
  11. -SELECT relname, relkind, relpersistence FROM pg_class WHERE relname ~ '^unlogged\d' ORDER BY relname;
  12. -DROP TABLE unlogged2;
  13. -INSERT INTO unlogged1 VALUES (42);
  14. -CREATE UNLOGGED TABLE public.unlogged2 (a int primary key); -- also OK
  15. -CREATE UNLOGGED TABLE pg_temp.unlogged3 (a int primary key); -- not OK
  16. -CREATE TABLE pg_temp.implicitly_temp (a int primary key); -- OK
  17. CREATE TEMP TABLE explicitly_temp (a int primary key); -- also OK
  18. -CREATE TEMP TABLE pg_temp.doubly_temp (a int primary key); -- also OK
  19. -CREATE TEMP TABLE public.temp_to_perm (a int primary key); -- not OK
  20. -DROP TABLE unlogged1, public.unlogged2;
  21. CREATE TABLE as_select1 AS SELECT * FROM pg_class WHERE relkind = 'r';
  22. CREATE TABLE as_select1 AS SELECT * FROM pg_class WHERE relkind = 'r';
  23. @@ -301,8 +287,10 @@
  24. CREATE TABLE withoid() WITH (oids = true);
  25. -- but explicitly not adding oids is still supported
  26. -CREATE TEMP TABLE withoutoid() WITHOUT OIDS; DROP TABLE withoutoid;
  27. -CREATE TEMP TABLE withoutoid() WITH (oids = false); DROP TABLE withoutoid;
  28. +CREATE TEMP TABLE withoutoid() WITHOUT OIDS;
  29. +DROP TABLE withoutoid;
  30. +CREATE TEMP TABLE withoutoid() WITH (oids = false);
  31. +DROP TABLE withoutoid;
  32. -- check restriction with default expressions
  33. -- invalid use of column reference in default expressions
  34. @@ -321,7 +309,9 @@
  35. -- Verify that subtransaction rollback restores rd_createSubid.
  36. BEGIN;
  37. CREATE TABLE remember_create_subid (c int);
  38. -SAVEPOINT q; DROP TABLE remember_create_subid; ROLLBACK TO q;
  39. +SAVEPOINT q;
  40. +DROP TABLE remember_create_subid;
  41. +ROLLBACK TO q;
  42. COMMIT;
  43. DROP TABLE remember_create_subid;
  44. @@ -329,7 +319,9 @@
  45. CREATE TABLE remember_node_subid (c int);
  46. BEGIN;
  47. ALTER TABLE remember_node_subid ALTER c TYPE bigint;
  48. -SAVEPOINT q; DROP TABLE remember_node_subid; ROLLBACK TO q;
  49. +SAVEPOINT q;
  50. +DROP TABLE remember_node_subid;
  51. +ROLLBACK TO q;
  52. COMMIT;
  53. DROP TABLE remember_node_subid;
  54. @@ -753,11 +745,6 @@
  55. CREATE TABLE part_a PARTITION OF parted FOR VALUES IN ('a');
  56. --- only inherited attributes (never local ones)
  57. -SELECT attname, attislocal, attinhcount FROM pg_attribute
  58. - WHERE attrelid = 'part_a'::regclass and attnum > 0
  59. - ORDER BY attnum;
  60. -
  61. -- able to specify column default, column constraint, and table constraint
  62. -- first check the "column specified more than once" error