-
Notifications
You must be signed in to change notification settings - Fork 550
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
tables
column in sys.snapshots
is missing quotes
#14087
Comments
Imho we'd want to keep having this table names in
|
However, in your case, @matriv, the schema and table names are returned separately in |
It sounds like a valid point, thx for explaining it further! |
Hello, noobie contributor here. I'd like to tackle this issue, but am struggling to understand where to start. Doing a file search of sys.snapshots didn't help a ton. Could you give me a little bit of insight on where to start looking? |
Thx for your interest @RichardIcecube, the class you want to check is |
I'm not sure if it's a good idea to just add quoting now after the fact. The workaround posted would stop working so it is kinda a breaking change. Maybe instead we could add an additional object array with |
@matriv Thank you for helping me locate the points of interest in the program. I will do my best to build an understanding of how the code works. I apologize for being a bit green, but I'm trying my best to follow along. To clarify what I need to do, @mfussenegger, are you suggesting creating another object array along with the existing one labeled If so, my current understanding of doing this would involve editing If I'm mistaken at all on this process, please correct errors |
Yes. (But I don't really have a good name for it)
See crate/server/src/main/java/io/crate/expression/reference/sys/snapshot/SysSnapshot.java Lines 93 to 98 in 8c7ea46
and: crate/server/src/main/java/io/crate/metadata/RelationName.java Lines 90 to 93 in 8c7ea46
|
Unfortunately, I am a bit out of my depth here. Best of luck to whoever decides to tackle this issue! |
no worries @RichardIcecube, and apologies, I shouldn't have rushed to put the |
The new column `table_relations` contains an array of objects including the `table_schema` and `table_name` of all tables inside the snapshot. Closes #14087.
The new column `table_relations` contains an array of objects including the `table_schema` and `table_name` of all tables inside the snapshot. Closes #14087.
CrateDB version
5.3.0
CrateDB setup information
No response
Problem description
Table names in
sys.snapshots
'stables
array column aren't quoted, making it hard to use its values.Steps to Reproduce
In a situation where I want to automate dropping tables before a restore, I may want to write queries such as:
Actual Result
See above.
Expected Result
Return a properly quoted name (
doc."I-need-quotes"
) intables
that can easily be used further. Alternatively, split uptable_name
andschema_name
into separate columns, soQUOTE_IDENT
can get applied to them.The text was updated successfully, but these errors were encountered: