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

Fix PGSQL Bug (better use JOIN rather than ,) #985

Closed
wants to merge 3 commits into from
Closed

Conversation

FHenry
Copy link
Member

@FHenry FHenry commented May 25, 2013

No description provided.

@eldy
Copy link
Member

eldy commented May 25, 2013

I think a better solution is not in using inner join. We can keep , but problem is into the LEFT JOIN that is not at wrong place.
When you do

select from a,b,c left join x on x.fieldx=a.fielda where ...

this is wrong with pgsql but also wrong for standard. You must modify into

select from a left join x on x.fieldx=a.fielda, b, c where ...

Reason is that a "left join" must be JUST after the table the "on" is for.
Doing this, you can fix pgsql without rewrite all request and changing into INNER JOIN. Moving "left join" at correct place should be enough. I prefer this writing because INNER JOIN bring other problems (i can't remember which one, but we spent so many time to remove all INNER JOIN in code in version 3.0 or 3.1 that i prefer to avoid if wa can and i think moving left join should be enough).

Can you check that my solution also work and try to for this patch instead of this one ?

@FHenry
Copy link
Member Author

FHenry commented May 25, 2013

Ok, I understand, I will check.
The other point on commonobject/ficheinterdet is more diffcult. For 3.3 and 3.4 (cause data base schema change is no more allowed) my fix can be ok but in dev branch we should add fk_parent_line into ficheinterdet and not merge the proposal fix. What do you think ?

@eldy
Copy link
Member

eldy commented May 25, 2013

I completed definition of freeze to be more clear about adding columns: http://wiki.dolibarr.org/index.php/Category:RoadMap#Freeze_definition
Adding for 3.3 (maintenancen branch is not possible), however, adding in beta version 3.4, since it is to fix a bug, is possible.

@FHenry
Copy link
Member Author

FHenry commented May 25, 2013

Ok, I've done the pull request on 3.4 Branch. I close This pull request. I will check the left join in another pull request

@FHenry FHenry closed this May 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants