From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Do we need SQL-level access to amoptions functions? |
Date: | 2016-01-17 20:13:30 |
Message-ID: | 2755.1453061610@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
There is some text in indexam.sgml currently that says
[ index AMs' amoptions functions ] should be correctly
declared as taking <type>text[]</> and <type>bool</> and returning
<type>bytea</>. This provision allows client code to execute
<function>amoptions</> to test validity of options settings.
In the pending AM interface rewrite, amoptions has been changed to a C API
which means it's not accessible from SQL. So if there's anything out
there that is actually relying on being able to call, eg, ginoptions()
from SQL, it's gonna be broken.
Does anyone know of client code that's actually doing this?
If we do want to continue supporting this type of thing, we could invent
a new function, say validate_amoptions(amname text, options text[])
that would look up and call the correct amoptions function. This would be
much easier to use from SQL anyway; right now you could only do it, for an
arbitrary AM, with a series of two queries with the function name obtained
from the first query being inserted into the second one. Ugh. (The lack
of complaints about this suggests nobody is doing it.)
I'm not planning to hold off committing the interface rewrite because of
this, but if anyone wants to preserve this functionality, they should
think about writing such a function in time for 9.6.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2016-01-17 21:38:45 | Re: Proposal: speeding up GIN build with parallel workers |
Previous Message | Igal @ Lucee.org | 2016-01-17 20:07:58 | Cannot find a working 64-bit integer type |