Skip to content

fix type resolution in select of create view stmt#2558

Merged
jennifersp merged 5 commits intomainfrom
jennifer/fix
Apr 9, 2026
Merged

fix type resolution in select of create view stmt#2558
jennifersp merged 5 commits intomainfrom
jennifer/fix

Conversation

@jennifersp
Copy link
Copy Markdown
Contributor

No description provided.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Main PR
covering_index_scan_postgres 1096.95/s 1098.05/s +0.1%
index_join_postgres 157.28/s 158.43/s +0.7%
index_join_scan_postgres 205.24/s 206.49/s +0.6%
index_scan_postgres 12.06/s 11.99/s -0.6%
oltp_point_select 2322.98/s 2309.88/s -0.6%
oltp_read_only 1853.94/s 1838.34/s -0.9%
select_random_points 129.46/s 130.08/s +0.4%
select_random_ranges 830.73/s 822.93/s -1.0%
table_scan_postgres 11.79/s 11.85/s +0.5%
types_table_scan_postgres 5.44/s 5.46/s +0.3%

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Main PR
Total 42090 42090
Successful 17861 17891
Failures 24229 24199
Partial Successes1 5625 5626
Main PR
Successful 42.4353% 42.5065%
Failures 57.5647% 57.4935%

${\color{red}Regressions (6)}$

triggers

QUERY:          UPDATE main_table SET a = a + 1 WHERE b < 30;
RECEIVED ERROR: column "tg_argv" could not be found in any table in scope (errno 1105) (sqlstate HY000)
QUERY:          INSERT INTO main_table (a) VALUES (123), (456);
RECEIVED ERROR: column "tg_argv" could not be found in any table in scope (errno 1105) (sqlstate HY000)
QUERY:          update table_with_oids set a = a + 1;
RECEIVED ERROR: variable `new.tableoid` could not be found (errno 1105) (sqlstate HY000)
QUERY:          UPDATE some_t SET some_col = TRUE;
RECEIVED ERROR: column "tg_argv" could not be found in any table in scope (errno 1105) (sqlstate HY000)
QUERY:          UPDATE some_t SET some_col = FALSE;
RECEIVED ERROR: column "tg_argv" could not be found in any table in scope (errno 1105) (sqlstate HY000)
QUERY:          UPDATE some_t SET some_col = TRUE;
RECEIVED ERROR: column "tg_argv" could not be found in any table in scope (errno 1105) (sqlstate HY000)

${\color{lightgreen}Progressions (38)}$

create_function_sql

QUERY: CREATE FUNCTION functest_S_10(a text, b date) RETURNS boolean
    LANGUAGE SQL
    BEGIN ATOMIC
        SELECT a = 'abcd' AND b > '2001-01-01';
    END;
QUERY: CREATE FUNCTION functest_S_16(a int, b int) RETURNS void
    LANGUAGE SQL
    BEGIN ATOMIC
        INSERT INTO functest1 SELECT a + $2;
    END;
QUERY: CREATE FUNCTION functest_S_15(x int) RETURNS boolean
LANGUAGE SQL
BEGIN ATOMIC
    select case when x % 2 = 0 then true else false end;
END;
QUERY: SELECT functest_S_10('abcd', '2020-01-01');
QUERY: CREATE FUNCTION functest_sri2() RETURNS SETOF int
LANGUAGE SQL
STABLE
BEGIN ATOMIC
    SELECT * FROM functest3;
END;

foreign_key

QUERY: alter table fkpart1.fk_part detach partition fkpart1.fk_part_1;
QUERY: alter table fkpart2.fk_part_1 attach partition fkpart2.fk_part_1_1 for values in (1);
QUERY: alter table fkpart2.fk_part detach partition fkpart2.fk_part_1;

plpgsql

QUERY: create trigger tg_chkslotname before insert
    on PSlot for each row execute procedure tg_chkslotname('PS');
QUERY: create trigger tg_chkslotname before insert
    on WSlot for each row execute procedure tg_chkslotname('WS');
QUERY: create trigger tg_chkslotname before insert
    on PLine for each row execute procedure tg_chkslotname('PL');
QUERY: create trigger tg_chkslotname before insert
    on IFace for each row execute procedure tg_chkslotname('IF');
QUERY: create trigger tg_chkslotname before insert
    on PHone for each row execute procedure tg_chkslotname('PH');
QUERY: create trigger tg_backlink_a after insert or update or delete
    on PSlot for each row execute procedure tg_backlink_a('PS');
QUERY: create trigger tg_backlink_a after insert or update or delete
    on WSlot for each row execute procedure tg_backlink_a('WS');
QUERY: create trigger tg_backlink_a after insert or update or delete
    on PLine for each row execute procedure tg_backlink_a('PL');
QUERY: create trigger tg_slotlink_a after insert or update or delete
    on PSlot for each row execute procedure tg_slotlink_a('PS');
QUERY: create trigger tg_slotlink_a after insert or update or delete
    on WSlot for each row execute procedure tg_slotlink_a('WS');
QUERY: create trigger tg_slotlink_a after insert or update or delete
    on IFace for each row execute procedure tg_slotlink_a('IF');
QUERY: create trigger tg_slotlink_a after insert or update or delete
    on HSlot for each row execute procedure tg_slotlink_a('HS');
QUERY: create trigger tg_slotlink_a after insert or update or delete
    on PHone for each row execute procedure tg_slotlink_a('PH');

psql

QUERY: SELECT e.extname AS "Name", e.extversion AS "Version", n.nspname AS "Schema", c.description AS "Description"
FROM pg_catalog.pg_extension e LEFT JOIN pg_catalog.pg_namespace n ON n.oid = e.extnamespace LEFT JOIN pg_catalog.pg_description c ON c.objoid = e.oid AND c.classoid = 'pg_catalog.pg_extension'::pg_catalog.regclass
WHERE e.extname OPERATOR(pg_catalog.~) E'^(no\\.such\\.installed\\.extension)$' COLLATE pg_catalog.default
ORDER BY 1;

publication

QUERY: ALTER TABLE sch1.tbl1 ATTACH PARTITION sch1.tbl1_part3 FOR VALUES FROM (20) to (30);

replica_identity

QUERY: ALTER TABLE ONLY test_replica_identity4
  ATTACH PARTITION test_replica_identity4_1 FOR VALUES IN (1);

sequence

QUERY: SELECT pg_catalog.quote_ident(nspname) || '.' ||
   pg_catalog.quote_ident(relname) || '.' ||
   pg_catalog.quote_ident(attname),
   d.deptype
FROM pg_catalog.pg_class c
INNER JOIN pg_catalog.pg_depend d ON c.oid=d.refobjid
INNER JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace
INNER JOIN pg_catalog.pg_attribute a ON (
 a.attrelid=c.oid AND
 a.attnum=d.refobjsubid)
WHERE d.classid='pg_catalog.pg_class'::pg_catalog.regclass
 AND d.refclassid='pg_catalog.pg_class'::pg_catalog.regclass
 AND d.objid='161630'
 AND d.deptype IN ('a', 'i')
QUERY: SELECT pg_catalog.quote_ident(nspname) || '.' ||
   pg_catalog.quote_ident(relname) || '.' ||
   pg_catalog.quote_ident(attname),
   d.deptype
FROM pg_catalog.pg_class c
INNER JOIN pg_catalog.pg_depend d ON c.oid=d.refobjid
INNER JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace
INNER JOIN pg_catalog.pg_attribute a ON (
 a.attrelid=c.oid AND
 a.attnum=d.refobjsubid)
WHERE d.classid='pg_catalog.pg_class'::pg_catalog.regclass
 AND d.refclassid='pg_catalog.pg_class'::pg_catalog.regclass
 AND d.objid='161640'
 AND d.deptype IN ('a', 'i')
QUERY: SELECT pg_catalog.quote_ident(nspname) || '.' ||
   pg_catalog.quote_ident(relname) || '.' ||
   pg_catalog.quote_ident(attname),
   d.deptype
FROM pg_catalog.pg_class c
INNER JOIN pg_catalog.pg_depend d ON c.oid=d.refobjid
INNER JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace
INNER JOIN pg_catalog.pg_attribute a ON (
 a.attrelid=c.oid AND
 a.attnum=d.refobjsubid)
WHERE d.classid='pg_catalog.pg_class'::pg_catalog.regclass
 AND d.refclassid='pg_catalog.pg_class'::pg_catalog.regclass
 AND d.objid='161640'
 AND d.deptype IN ('a', 'i')

triggers

QUERY: CREATE TRIGGER after_upd_row_trig AFTER UPDATE ON main_table
FOR EACH ROW EXECUTE PROCEDURE trigger_func('after_upd_row');
QUERY: CREATE TRIGGER insert_a AFTER INSERT ON main_table
FOR EACH ROW WHEN (NEW.a = 123) EXECUTE PROCEDURE trigger_func('insert_a');
QUERY: CREATE TRIGGER delete_a AFTER DELETE ON main_table
FOR EACH ROW WHEN (OLD.a = 123) EXECUTE PROCEDURE trigger_func('delete_a');
QUERY: DROP TRIGGER insert_a ON main_table;
QUERY: DROP TRIGGER delete_a ON main_table;
QUERY: create trigger oid_unchanged_trig after update on table_with_oids
	for each row
	when (new.tableoid = old.tableoid AND new.tableoid <> 0)
	execute procedure trigger_func('after_upd_oid_unchanged');
QUERY: DROP TRIGGER after_upd_row_trig ON main_table;
QUERY: CREATE TRIGGER some_trig_before BEFORE UPDATE ON some_t FOR EACH ROW
  EXECUTE PROCEDURE dummy_update_func('before');
QUERY: CREATE TRIGGER some_trig_aftera AFTER UPDATE ON some_t FOR EACH ROW
  WHEN (NOT OLD.some_col AND NEW.some_col)
  EXECUTE PROCEDURE dummy_update_func('aftera');
QUERY: CREATE TRIGGER some_trig_afterb AFTER UPDATE ON some_t FOR EACH ROW
  WHEN (NOT NEW.some_col)
  EXECUTE PROCEDURE dummy_update_func('afterb');

window

QUERY: CREATE FUNCTION unbounded_syntax_test2a(unbounded int) RETURNS TABLE (a int, b int, c int)
LANGUAGE SQL
BEGIN ATOMIC
  SELECT sum(unique1) over (rows between unbounded preceding and unbounded following),
         unique1, four
  FROM tenk1 WHERE unique1 < 10;
END;

Footnotes

  1. These are tests that we're marking as Successful, however they do not match the expected output in some way. This is due to small differences, such as different wording on the error messages, or the column names being incorrect while the data itself is correct.

@jennifersp jennifersp requested a review from Hydrocharged April 8, 2026 23:18
Copy link
Copy Markdown
Collaborator

@Hydrocharged Hydrocharged left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly LGTM!

@jennifersp jennifersp enabled auto-merge April 9, 2026 20:41
@jennifersp jennifersp merged commit f3a4abb into main Apr 9, 2026
18 checks passed
@jennifersp jennifersp deleted the jennifer/fix branch April 9, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants