From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Global Sequences |
Date: | 2012-10-18 15:15:48 |
Message-ID: | 27264.1350573348@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Tue, Oct 16, 2012 at 1:29 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Or maybe better, invent a level of indirection like a "sequence access
>> method" (comparable to index access methods) that provides a compatible
>> set of substitute functions for sequence operations. If you want to
>> override nextval() for a sequence, don't you likely also need to
>> override setval(), currval(), etc? Not to mention overriding ALTER
>> SEQUENCE's behavior.
> This might be better, but it's also possibly more mechanism than we
> truly need here. But then again, if we're going to end up with more
> than a handful of handlers, we probably do want to do this.
It's definitely a lot of mechanism, and if we can get away with
something simpler that's fine with me. But I'd want to see a pretty
bulletproof argument why overriding *only* nextval is sufficient
(and always will be) before accepting a hook for just nextval. If we
build an equivalent amount of functionality piecemeal it's going to
be a lot uglier than if we recognize we need this type of concept
up front.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Browne | 2012-10-18 15:18:42 | Re: [RFC][PATCH] wal decoding, attempt #2 - Design Documents (really attached) |
Previous Message | Robert Haas | 2012-10-18 15:09:53 | Re: Bug in -c CLI option of pg_dump/pg_restore |