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
Currently, most column creation and copying operations are using name or index to identify columns. This is brittle, and we've decided to change to using the attnum property of columns instead.
Proposed solution
Each function in db/columns/operations/create.py should use attnum instead of column_index, and should properly use the table_oid, attnum pair to identify columns for its logic. Use the function get_column_name_from_attnum function in db.columns.operations.select for this where needed.
Additional context
We'll clearly need to modify any place where the functions in the above file are called as well.
Beware, some internal functions in the copying logic will need to be changed, and some have misleading variable names (e.g., _duplicate_column_data). We may need to connect some pieces with logic to get index from attnum where other code we're not changing is called.
The text was updated successfully, but these errors were encountered:
kgodey
removed
good first issue
Everything in "Help wanted", PLUS being relatively easy and straightforward to implement.
help wanted
Community contributors can implement this
labels
Mar 1, 2022
Problem
Currently, most column creation and copying operations are using name or index to identify columns. This is brittle, and we've decided to change to using the
attnum
property of columns instead.Proposed solution
Each function in
db/columns/operations/create.py
should useattnum
instead ofcolumn_index
, and should properly use thetable_oid, attnum
pair to identify columns for its logic. Use the functionget_column_name_from_attnum
function indb.columns.operations.select
for this where needed.Additional context
We'll clearly need to modify any place where the functions in the above file are called as well.
Beware, some internal functions in the copying logic will need to be changed, and some have misleading variable names (e.g.,
_duplicate_column_data
). We may need to connect some pieces with logic to get index fromattnum
where other code we're not changing is called.The text was updated successfully, but these errors were encountered: