-
Notifications
You must be signed in to change notification settings - Fork 16
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
Table-qualified prof tags #33
Comments
Hrm, I had started some work so that you could have nested pprof tags; a pprof tag on a named struct field within a struct would work as a prefix for fields within the inner struct with their own pprof tags. There's still some additional work to do to make this functional. If you have two different fields in the same struct with different pprof tags with different values, I don't see why Proteus wouldn't work right now. All that matters is that there is a column in the result set whose name matches a pprof tag. If that's not working, let me know (a small example is best), and I can see what's going on. |
The issue is that with SELECT *, the columns have clashing names in the result set. So in the above query, the result will have table1.uuid and table2.uuid. I'd like to reference the table qualifiers in a |
Doing some research, seems that it's not possible to bulk rename columns in the query https://www.postgresql.org/message-id/4CA2A1F3.9000708%40darrenduncan.net - so in the case of joining two tables together with the same columns (for example id or uuid), you have to explicitly enumerate each column with an AS clause, which is kinda painful. |
Let me set up a postgres db and think about what can be done. Unless there are different names, proteus can't assign the values, but maybe there's a different name I can latch on to, or maybe there's a way to specify order information in the columns (which is not my favorite way to access values from a result set) |
I have a table schema like:
I'd like to do a query like
SELECT * from table1 JOIN table2 ON table1.ref = table2.uuid
, and havetable2
referenced as a child struct. The problem is that both tables haveid
anduuid
columns. Can I qualify theprof
tags so thattable2
has aprof
tag ofprof:"table2.uuid"
for example? I know I can use"AS"
clauses for each column, but this becomes a maintenance nightmare for any sizable number of queries.The text was updated successfully, but these errors were encountered: