Re: Order of enforcement of CHECK constraints?
От | Fabrízio de Royes Mello |
---|---|
Тема | Re: Order of enforcement of CHECK constraints? |
Дата | |
Msg-id | CAFcNs+o3imT__FbKpjryRTKgVJ8tzcLLXRCzeaYzyS4ODd579Q@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Order of enforcement of CHECK constraints? (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Order of enforcement of CHECK constraints?
|
Список | pgsql-hackers |
<div dir="ltr"><div class="gmail_extra"><br />On Fri, Mar 20, 2015 at 4:37 PM, Tom Lane <<a href="mailto:tgl@sss.pgh.pa.us">tgl@sss.pgh.pa.us</a>>wrote:<br />><br />> Fabrízio de Royes Mello <<a href="mailto:fabriziomello@gmail.com">fabriziomello@gmail.com</a>>writes:<br />> > On Fri, Mar 20, 2015 at 4:19PM, Peter Geoghegan <<a href="mailto:pg@heroku.com">pg@heroku.com</a>> wrote:<br />> >> On Fri, Mar 20,2015 at 12:15 PM, Tom Lane <<a href="mailto:tgl@sss.pgh.pa.us">tgl@sss.pgh.pa.us</a>> wrote:<br />> >>>We could fix it by, say, having CheckConstraintFetch() sort the<br />> >>> constraints by name afterloading them.<br />><br />> >> What not by OID, as with indexes? Are you suggesting that this would<br />>>> become documented behavior?<br />><br />> > I think they should be executed in alphabetical orderlike triggers.<br />><br />> Yeah. We already have a comparable, and documented, behavior for<br />> triggers,so if we're going to do anything about this I'd vote for<br />> sorting by name (or more specifically, by strcmp()).<br/>><br /><br /></div><div class="gmail_extra">Isn't better do this to read pg_constraint in name order?<br/><br />- conscan = systable_beginscan(conrel, ConstraintRelidIndexId, true,<br />+ conscan = systable_beginscan(conrel,ConstraintNameNspIndexId, true,<br /><br /></div><div class="gmail_extra">Regards,<br /></div><divclass="gmail_extra"><br />--<br />Fabrízio de Royes Mello<br />Consultoria/Coaching PostgreSQL<br />>>Timbira: <a href="http://www.timbira.com.br">http://www.timbira.com.br</a><br />>> Blog: <a href="http://fabriziomello.github.io">http://fabriziomello.github.io</a><br/>>> Linkedin: <a href="http://br.linkedin.com/in/fabriziomello">http://br.linkedin.com/in/fabriziomello</a><br/>>> Twitter: <a href="http://twitter.com/fabriziomello">http://twitter.com/fabriziomello</a><br/>>> Github: <a href="http://github.com/fabriziomello">http://github.com/fabriziomello</a></div></div>
В списке pgsql-hackers по дате отправления: