Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

importccl: Bundle format imports do not support UDT #67983

Open
adityamaru opened this issue Jul 23, 2021 · 1 comment
Open

importccl: Bundle format imports do not support UDT #67983

adityamaru opened this issue Jul 23, 2021 · 1 comment
Labels
A-import Issues related to IMPORT syntax C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-queries SQL Queries Team

Comments

@adityamaru
Copy link
Contributor

adityamaru commented Jul 23, 2021

Bundle formats such as PGDUMP and MYSQLDUMP do not support user-defined types. Today, PGDUMP files with CREATE TYPE statements will either fail or ignore the create type based on whether ignore_unsupported_statements was passed.

If a column in a table in the dump file uses the UDT then this leads to all sorts of undefined behavior (currently a NPE). Since bundle formats offer us the guarantee that we will only use objects that are in the dump file itself, we should add support for CREATE TYPE similar to how we handle UDS.

Jira issue: CRDB-8814
Epic CRDB-8353

@adityamaru adityamaru added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-disaster-recovery labels Jul 23, 2021
@adityamaru
Copy link
Contributor Author

cc: @nihalpednekar since you have been working in this area

craig bot pushed a commit that referenced this issue Aug 5, 2021
67994: importccl: fail PGDUMP IMPORT if we see a UDT r=pbardea a=adityamaru

In 21.1 we added `ignore_unsupported_statements` that ignored
all statements that we didnt support while parsing the PGDUMP
file. We don't support `CREATE TYPE` and its subsequent usage,
and this currently causes a NPE.

While we work on adding UDT support to PGDUMP we should make
an exception to the ignore option and fail the import instead.

Informs: #67983

Release note (bug fix): IMPORT PGDUMP with a UDT would result
in a nil pointer exception. This change makes it fail gracefully.

Co-authored-by: Aditya Maru <[email protected]>
@ZhouXing19 ZhouXing19 added the A-import Issues related to IMPORT syntax label Nov 3, 2022
@exalate-issue-sync exalate-issue-sync bot added T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) and removed T-disaster-recovery labels Nov 17, 2022
@rafiss rafiss removed the T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) label Apr 4, 2023
@blathers-crl blathers-crl bot added the T-sql-queries SQL Queries Team label Apr 4, 2023
@exalate-issue-sync exalate-issue-sync bot added T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) and removed T-sql-queries SQL Queries Team labels Apr 4, 2023
@rafiss rafiss added T-sql-queries SQL Queries Team and removed T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) labels Apr 4, 2023
@mgartner mgartner moved this to New Backlog in SQL Queries Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-import Issues related to IMPORT syntax C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-queries SQL Queries Team
Projects
Status: Backlog
Development

No branches or pull requests

3 participants