You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is an interesting project and I have a couple of questions.
I. Are there any reasons to not use [now] special types for appropriate columns instead of just "text"?
regclass for parent_table and template_table
regnamespace for retention_schema
etc.
You are playing with "split" and "join" without quoting/unquoting those parts and it could lead to unpredictable errors.
Also the use of special types helps to avoid unnecessary explicit joins when you looking up related data in pg_class.
Moreover regclass etc. allow other people to safely (without paying extra attention to @extschema@.part_config{,_sub}) rename objects or move tables to any other schema.
II. Since you refactor the project and change the major version part (which allows breaking change) and it is already in the "beta" are you planning to introduce more changes before release (for example, described in #509 or #511 or questioned above) or this state will be released (with bug fixes and doc improvements)?
P.S.:
Please, for security reasons, NEVER advise [1] other people to create a DDL relation name by concatenating its parts, use the format function for this (just like it is used in the project codebase)!
- SELECT 'ALTER TABLE '||n.nspname||'.'||c.relname||' RENAME TO '||substring(…+ SELECT format('ALTER TABLE %I.%I RENAME TO %I;', nspname, relname, substring(…
I'll have to look into the usage of regclass/regnamespace. Did you mean for function parameters or just more internally in the function.
All features that will be in the initial 5.0.0 release have been tagged as such if there is an issue open. If it is tagged for 5.1, those will be what I look into more immediately for the next release. Issues marked Future are under consideration, but aren't planned for any specific release yet.
Good point on the SQL instructions there. I definitely use format() in the code extensively, so I should stick with that for my examples.
Hello!
It is an interesting project and I have a couple of questions.
I.
Are there any reasons to not use [now] special types for appropriate columns instead of just "text"?regclass
forparent_table
andtemplate_table
regnamespace
forretention_schema
etc.
You are playing with "split" and "join" without quoting/unquoting those parts and it could lead to unpredictable errors.
Also the use of special types helps to avoid unnecessary explicit joins when you looking up related data in pg_class.
Moreover
regclass
etc. allow other people to safely (without paying extra attention to@extschema@.part_config{,_sub}
) rename objects or move tables to any other schema.II.
Since you refactor the project and change the major version part (which allows breaking change) and it is already in the "beta" are you planning to introduce more changes before release (for example, described in #509 or #511 or questioned above) or this state will be released (with bug fixes and doc improvements)?P.S.:
Please, for security reasons, NEVER advise [1] other people to create a DDL relation name by concatenating its parts, use the
format
function for this (just like it is used in the project codebase)!¹ https://github.com/pgpartman/pg_partman/blob/5.0.0-beta/doc/pg_partman_5.0.0_upgrade.md
The text was updated successfully, but these errors were encountered: