pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Does it equal to execute "CREATE ACCESS METHOD"?
5+ messages / 2 participants
[nested] [flat]

* Does it equal to execute "CREATE ACCESS METHOD"?
@ 2022-10-29 15:25  jacktby@gmail.com <jacktby@gmail.com>
  0 siblings, 2 replies; 5+ messages in thread

From: jacktby@gmail.com @ 2022-10-29 15:25 UTC (permalink / raw)
  To: pgsql-general <pgsql-general@lists.postgresql.org>

Sorry, I open another mail list to ask this question.

When I add 
"{ oid => '6015', oid_symbol => 'SPB_AM_OID',
  descr => 'SPB index access method',
  amname => 'spb', amhandler => 'spbhandler', amtype => 'i' },"
in pg_am.dat
and  add
"{ oid => '388', descr => 'spb index access method handler',
  proname => 'spbhandler', provolatile => 'v',
  prorettype => 'index_am_handler', proargtypes => 'internal',
  prosrc => 'spbhandler' }," in pg_proc.dat,

so when I use the make install && cd contrib;make install;
whether it equals to execute create access method?

by the way, I've added the spb codes in src/access/spb, so don't worry about the spbhandler.

And Sorry for the another mail "access method xxx does not exist", you suggest me add new 
Am Index in contrib, But I need to modify gist to spb, so that's not my require. And I need to know
add those in pg_proc.dat and pg_am.dat, if it won't create access method for spb, what else I need to 
do?


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



jacktby@gmail.com




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Does it equal to execute "CREATE ACCESS METHOD"?
@ 2022-10-29 15:34  jacktby@gmail.com <jacktby@gmail.com>
  parent: jacktby@gmail.com <jacktby@gmail.com>
  1 sibling, 0 replies; 5+ messages in thread

From: jacktby@gmail.com @ 2022-10-29 15:34 UTC (permalink / raw)
  To: jacktby@gmail.com <jacktby@gmail.com>; pgsql-general <pgsql-general@lists.postgresql.org>

Sorry, I open another mail list to ask this question.

When I add 
"{ oid => '6015', oid_symbol => 'SPB_AM_OID',
  descr => 'SPB index access method',
  amname => 'spb', amhandler => 'spbhandler', amtype => 'i' },"
in pg_am.dat
and  add
"{ oid => '388', descr => 'spb index access method handler',
  proname => 'spbhandler', provolatile => 'v',
  prorettype => 'index_am_handler', proargtypes => 'internal',
  prosrc => 'spbhandler' }," in pg_proc.dat,

so when I use the make install && cd contrib;make install;
whether it equals to execute create access method?

by the way, I've added the spb codes in src/access/spb, so don't worry about the spbhandler.

And Sorry for the another mail "access method xxx does not exist", you suggest me add new 
Am Index in contrib, But I need to modify gist to spb, so that's not my require. And I need to know
add those in pg_proc.dat and pg_am.dat, if it won't create access method for spb, what else I need to 
do?


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



jacktby@gmail.com




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Does it equal to execute "CREATE ACCESS METHOD"?
@ 2022-10-29 15:34  Tom Lane <tgl@sss.pgh.pa.us>
  parent: jacktby@gmail.com <jacktby@gmail.com>
  1 sibling, 1 reply; 5+ messages in thread

From: Tom Lane @ 2022-10-29 15:34 UTC (permalink / raw)
  To: jacktby@gmail.com <jacktby@gmail.com>; +Cc: pgsql-general <pgsql-general@lists.postgresql.org>

"jacktby@gmail.com" <jacktby@gmail.com> writes:
> When I add 
> "{ oid => '6015', oid_symbol => 'SPB_AM_OID',
>   descr => 'SPB index access method',
>   amname => 'spb', amhandler => 'spbhandler', amtype => 'i' },"
> in pg_am.dat
> and  add
> "{ oid => '388', descr => 'spb index access method handler',
>   proname => 'spbhandler', provolatile => 'v',
>   prorettype => 'index_am_handler', proargtypes => 'internal',
>   prosrc => 'spbhandler' }," in pg_proc.dat,
> so when I use the make install && cd contrib;make install;
> whether it equals to execute create access method?

Did you run initdb afterwards?  What you describe here should
result in an updated postgres.bki file, but that isn't the
same as catalog entries in a live database.

> And Sorry for the another mail "access method xxx does not exist", you suggest me add new 
> Am Index in contrib, But I need to modify gist to spb, so that's not my require. And I need to know
> add those in pg_proc.dat and pg_am.dat, if it won't create access method for spb, what else I need to 
> do?

To be very blunt, it doesn't sound to me that your skills with
Postgres are anywhere near up to the task of writing a new
index access method.  You should start with some less-ambitious
project to gain some familiarity with the code base.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Re: Does it equal to execute "CREATE ACCESS METHOD"?
@ 2022-10-29 15:39  jacktby@gmail.com <jacktby@gmail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 5+ messages in thread

From: jacktby@gmail.com @ 2022-10-29 15:39 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-general <pgsql-general@lists.postgresql.org>

"jacktby@gmail.com" <jacktby@gmail.com> writes:
> When I add 
> "{ oid => '6015', oid_symbol => 'SPB_AM_OID',
>   descr => 'SPB index access method',
>   amname => 'spb', amhandler => 'spbhandler', amtype => 'i' },"
> in pg_am.dat
> and  add
> "{ oid => '388', descr => 'spb index access method handler',
>   proname => 'spbhandler', provolatile => 'v',
>   prorettype => 'index_am_handler', proargtypes => 'internal',
>   prosrc => 'spbhandler' }," in pg_proc.dat,
> so when I use the make install && cd contrib;make install;
> whether it equals to execute create access method?

Did you run initdb afterwards?  What you describe here should
result in an updated postgres.bki file, but that isn't the
same as catalog entries in a live database.

> And Sorry for the another mail "access method xxx does not exist", you suggest me add new 
> Am Index in contrib, But I need to modify gist to spb, so that's not my require. And I need to know
> add those in pg_proc.dat and pg_am.dat, if it won't create access method for spb, what else I need to 
> do?

To be very blunt, it doesn't sound to me that your skills with
Postgres are anywhere near up to the task of writing a new
index access method.  You should start with some less-ambitious
project to gain some familiarity with the code base.

			regards, tom lane


^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Re: Does it equal to execute "CREATE ACCESS METHOD"?
@ 2022-10-29 15:45  jacktby@gmail.com <jacktby@gmail.com>
  parent: jacktby@gmail.com <jacktby@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: jacktby@gmail.com @ 2022-10-29 15:45 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-general <pgsql-general@lists.postgresql.org>

thanks for your advice, I realize my problems, can you give me some materials like some study routine for pg-internal?






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



jacktby@gmail.com



>"jacktby@gmail.com" <jacktby@gmail.com> writes:



>> When I add 



>> "{ oid => '6015', oid_symbol => 'SPB_AM_OID',



>>   descr => 'SPB index access method',



>>   amname => 'spb', amhandler => 'spbhandler', amtype => 'i' },"



>> in pg_am.dat



>> and  add



>> "{ oid => '388', descr => 'spb index access method handler',



>>   proname => 'spbhandler', provolatile => 'v',



>>   prorettype => 'index_am_handler', proargtypes => 'internal',



>>   prosrc => 'spbhandler' }," in pg_proc.dat,



>> so when I use the make install && cd contrib;make install;



>> whether it equals to execute create access method?



>



>Did you run initdb afterwards?  What you describe here should



>result in an updated postgres.bki file, but that isn't the



>same as catalog entries in a live database.



>



>> And Sorry for the another mail "access method xxx does not exist", you suggest me add new 



>> Am Index in contrib, But I need to modify gist to spb, so that's not my require. And I need to know



>> add those in pg_proc.dat and pg_am.dat, if it won't create access method for spb, what else I need to 



>> do?



>



>To be very blunt, it doesn't sound to me that your skills with



>Postgres are anywhere near up to the task of writing a new



>index access method.  You should start with some less-ambitious



>project to gain some familiarity with the code base.



>



>			regards, tom lane




^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2022-10-29 15:45 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-10-29 15:25 Does it equal to execute "CREATE ACCESS METHOD"? jacktby@gmail.com <jacktby@gmail.com>
2022-10-29 15:34 ` jacktby@gmail.com <jacktby@gmail.com>
2022-10-29 15:34 ` Tom Lane <tgl@sss.pgh.pa.us>
2022-10-29 15:39   ` jacktby@gmail.com <jacktby@gmail.com>
2022-10-29 15:45     ` jacktby@gmail.com <jacktby@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox