It should be possible to create queries with 'FROM table1 USING table2' syntax

Bug #322972 reported by Jamu Kakar
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Storm
In Progress
Medium
Thomas Herve

Bug Description

I don't know if this is standard SQL, but PostgreSQL supports it.

Related branches

Jamu Kakar (jkakar)
Changed in storm:
assignee: nobody → jkakar
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
James Henstridge (jamesh) wrote :

Could you make the branch attached to this bug public?

Revision history for this message
Jamu Kakar (jkakar) wrote :

Oops, it's public now, sorry about that.

Revision history for this message
James Henstridge (jamesh) wrote :

Thanks for making the branch public. It looks like one of your team memberships causes all your Storm branches to be private by default, so it might be worth checking if there is anything else that was meant to be public.

Looking at the grammar for PostgreSQL's select statement, it defines one form of from_item as:

    from_item [ NATURAL ] join_type from_item [ ON join_condition | USING ( join_column [, ...] ) ]

So this looks like it should be an option on the join itself (an alternative to "ON") rather than a separate type of join expression. Am I missing something?

Revision history for this message
Thomas Herve (therve) wrote :

I'm not sure what's your point. USING is mainly useful for DELETE statements.

Revision history for this message
James Henstridge (jamesh) wrote :

The code in Jamu's branch appeared to be generating USING clauses in SELECT statements. I agree that supporting "DELETE ... FROM ... USING ..." would be useful, but I think that would be better to do as part of the Delete() expression object and compile functions (so we can provide "auto tables" behaviour).

Revision history for this message
Thomas Herve (therve) wrote :

Ah ok. I think Jamu started this branch after a discussion with me, so I'm not sure he got what I meant at this time :). I agree that your approach looks saner.

Revision history for this message
Jamu Kakar (jkakar) wrote :

I'm unassigning this for the time being, as I'm not working on it.

Changed in storm:
assignee: Jamu Kakar (jkakar) → nobody
status: In Progress → New
Thomas Herve (therve)
Changed in storm:
assignee: nobody → Thomas Herve (therve)
status: New → In Progress
Thomas Herve (therve)
Changed in storm:
milestone: none → 0.19
Thomas Herve (therve)
summary: - Is should be possible to create queries with 'FROM table1 USING table2'
+ It should be possible to create queries with 'FROM table1 USING table2'
syntax
Thomas Herve (therve)
Changed in storm:
milestone: 0.19 → 0.20
Changed in storm:
milestone: 0.20 → 0.21
Colin Watson (cjwatson)
Changed in storm:
milestone: 0.21 → 0.22
Colin Watson (cjwatson)
Changed in storm:
milestone: 0.22 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.