On 2015-09-20 16:17, Alexander Korotkov wrote:
On Sun, Sep 20, 2015 at 5:02 PM, Petr Jelinek <p...@2ndquadrant.com

    Hmm, we might want these functons in any case (although I think just
    one function which would return all am params would be better).

    But why is it not evident? We do the validations in regression
    tests, even if we just copy those then it's enough for a start

The reason is that those validations were used only in regression tests
yet. It wasn't used for user-defined operator classes. User might define
invalid opclass and then alter it to valid. Or user might upgrade
opclass in two steps where intermediate step is invalid. This is why I
think validating opclasses in CREATE/ALTER command is not evident since
it changes user visible behavior and compatibility.
Simultaneously, implementing new API function just for regression tests
doesn't seem to worth it for me.

I think it's ok to not do automatic validation during CREATE/ALTER just yet. And I also think it's much worse to implement a SQL API which exposes internals just for regression tests than having a C API just for regression tests. The reason for moving AM to C API was to have less of the internals exposed at SQL level afaik.

 Petr Jelinek                  http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to