Hi All,
I've noticed for a long time that modules use the GenID() function to pick up a new ID for a new item to be inserted in db.
Why? An auto-increment db field wouldn't be better?
Thanks for clarification
Use of GenID() function
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Use of GenID() function
This is a historical thing.
Back when these modules were originally written, postgres did not support auto-increment fields. Therefore a 'sequence' table had to be used.
But that problem is now solved, and most new development uses auto increment fields.
However, for compatibility reasons, and because 'if it aint broke don't fix it'. we aren't going back to remove this stuff from existing code.
Back when these modules were originally written, postgres did not support auto-increment fields. Therefore a 'sequence' table had to be used.
But that problem is now solved, and most new development uses auto increment fields.
However, for compatibility reasons, and because 'if it aint broke don't fix it'. we aren't going back to remove this stuff from existing code.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Use of GenID() function
I see.
Thank you!
Thank you!