3 ms·
Just make a function with the table name as a parameter. Same effect as what you're looking for except not included in SELECT *. eg. SELECT col1, col2, col3(t
by ttfkam 4y ago
Just make a function with the table name as a parameter. Same effect as what you're looking for except not included in SELECT *.
eg.
SELECT col1, col2, col3(t)
FROM table_name t;
This is how Postgraphile solved the problem to great effect.
https://www.graphile.org/postgraphile/computed-columns/ https://www.graphile.org/postgraphile/computed-columns/