Re: Re: access method xxx does not exist

Поиск
Список
Период
Сортировка
От jacktby@gmail.com
Тема Re: Re: access method xxx does not exist
Дата
Msg-id 2022102920155312722925@gmail.com
обсуждение исходный текст
Ответ на access method xxx does not exist  ("jacktby@gmail.com" <jacktby@gmail.com>)
Ответы Re: access method xxx does not exist  (Julien Rouhaud <rjuju123@gmail.com>)
Re: Re: access method xxx does not exist  ("jacktby@gmail.com" <jacktby@gmail.com>)
Список pgsql-general
No , that's not what I want, I'm not try to use an exsited index in pg15, I'm tring to build a new index by myself. Can you give me metrials to study it?
 

jacktby@gmail.com
 
Date: 2022-10-29 20:00
Subject: Re: access method xxx does not exist
div.FoxDIV_20221029200259122 { font-size: 10.5pt }
On 2022-10-29 19:19:28 +0800, jacktby@gmail.com wrote:
> I'm trying to add a new index, but when I finish it, I use “ create index
> xxx_index on t1 using xxx(a); ”,it gives me access method "my_index" does not
> exist
> And I don't know where this message is from, can you grve me its position?


The syntax for CREATE INDEX is

CREATE INDEX ON table_name [ USING method ] ( column_name ... )

You use USING to specify the method (e.g. btree or gin), not the table
and/or columns. The columns (or expressions come in parentheses after
that.

So if you wanted an index on column a of table t1 you would simply
write:

CREATE INDEX ON t1 (a);

Or if you have a function xxx and you want a function based index on
xxx(a) of that table:

CREATE INDEX ON t1 (xxx(a));

(You can specify the name of the index, but why would you?)

> I do like this. I add oid in pg_am.dat and pg_proc.dat for my index.
> And I add codes in contrib and backend/access/myindex_name, is there
> any other places I need to add some infos?

What? Why are you doing these things?

        hp

--
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"

В списке pgsql-general по дате отправления:

Предыдущее
От: "Peter J. Holzer"
Дата:
Сообщение: Re: access method xxx does not exist
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: access method xxx does not exist