From: | Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Peter Geoghegan <pg(at)heroku(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Order of enforcement of CHECK constraints? |
Date: | 2015-03-23 15:20:14 |
Message-ID: | CAFcNs+o3imT__FbKpjryRTKgVJ8tzcLLXRCzeaYzyS4ODd579Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Mar 20, 2015 at 4:37 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> =?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= <fabriziomello(at)gmail(dot)com> writes:
> > On Fri, Mar 20, 2015 at 4:19 PM, Peter Geoghegan <pg(at)heroku(dot)com> wrote:
> >> On Fri, Mar 20, 2015 at 12:15 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >>> We could fix it by, say, having CheckConstraintFetch() sort the
> >>> constraints by name after loading them.
>
> >> What not by OID, as with indexes? Are you suggesting that this would
> >> become documented behavior?
>
> > I think they should be executed in alphabetical order like triggers.
>
> Yeah. We already have a comparable, and documented, behavior for
> triggers, so if we're going to do anything about this I'd vote for
> sorting by name (or more specifically, by strcmp()).
>
Isn't better do this to read pg_constraint in name order?
- conscan = systable_beginscan(conrel, ConstraintRelidIndexId, true,
+ conscan = systable_beginscan(conrel, ConstraintNameNspIndexId, true,
Regards,
--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog: http://fabriziomello.github.io
>> Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
>> Github: http://github.com/fabriziomello
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Janes | 2015-03-23 15:23:00 | Re: Table-level log_autovacuum_min_duration |
Previous Message | Robert Haas | 2015-03-23 15:02:03 | Re: barnacle (running CLOBBER_CACHE_RECURSIVELY) seems stuck since November |