How to implement read operations for my own access method?

Started by jacktby@gmail.comalmost 3 years ago2 messages
#1jacktby@gmail.com
jacktby@gmail.com

Hi,I'm trying to implement my own access method. But I find the functions baout read is difficult.
Can you give me an existed easy extension that impelment the tableamroutine to reference? I ho[e
it's not complicated like heap_am,and it support insert sqls and select sqls.Thanks

--------------

jacktby@gmail.com

#2Andrey Borodin
amborodin86@gmail.com
In reply to: jacktby@gmail.com (#1)
Re: How to implement read operations for my own access method?

On Sat, Feb 4, 2023 at 12:59 AM jacktby@gmail.com <jacktby@gmail.com> wrote:

Hi,I'm trying to implement my own access method. But I find the functions baout read is difficult.
Can you give me an existed easy extension that impelment the tableamroutine to reference? I ho[e
it's not complicated like heap_am,and it support insert sqls and select sqls.Thanks

Hi Jack,

I'd recommend first to start from official documentation on index
access methods [0]https://www.postgresql.org/docs/current/xindex.html.
Please also check the contrib/bloom module [1]https://github.com/postgres/postgres/tree/REL_15_STABLE/contrib/bloom. It is designed to
showcase index-as-extension technology.
Also, you can see my free lectures about details of implementation of
built-in access methods [2]https://www.youtube.com/watch?v=UgSeSo973lA&amp;list=PLzrhBdcKTjLTyCIdDO1ig8qCZFZYYi3VH. Also, I can offer you my PGCon talk
"Index DIY" about forking GiST into extension [3]https://github.com/x4m/index_diy.

Thank you!

Best regards, Andrey Borodin.
[0]: https://www.postgresql.org/docs/current/xindex.html
[1]: https://github.com/postgres/postgres/tree/REL_15_STABLE/contrib/bloom
[2]: https://www.youtube.com/watch?v=UgSeSo973lA&amp;list=PLzrhBdcKTjLTyCIdDO1ig8qCZFZYYi3VH
[3]: https://github.com/x4m/index_diy