Is there some kind of priority ranks assigned to CTE and table name ? For instance, if I have a table called table_a in the public schema, and I create a CTE table named table_a using WITH, which table will be taken if I use table_a in the SELECT query ?
--as an example
CREATE TABLE table_a (
id serial
);
WITH table_a AS (
SELECT id
FROM another_table
)
SELECT *
FROM table_a --> which table is this ?
;