Thread: New Access Method

New Access Method

From
"Alan Gatt"
Date:
Hello,<br /><br />I am trying to create a new index which is multidimensional (based on R-Tree) which can be used for
datawarehosuing. I have read the Developers' manual about adding new indexes, and now I want to start coding the new
index.<br /><br />My first step is to create the skeleton files, but I cannot compile Postgres now because of errors.
Thisis what I have done:<br /> - Create a header file in /src/includes/<br /> - Create a folder in /backend/access/ for
thenew index. <br /> - Created a new C file in the above folder <br /> - Copied a Makefile from the other access
methods,and changed the references to point to my C file <br /> - Edited the /backed/access Makefile to include my new
folder<br/><br />I am using Eclipse on WindowsXP. Any pointers about what have I done wrong or anything I missed?<br
/><br/>Thanks,<br />Alan<br /> 

Re: New Access Method

From
"Joshua D. Drake"
Date:
Alan Gatt wrote:
> Hello,
> 
> I am trying to create a new index which is multidimensional (based on
> R-Tree) which can be used for data warehosuing. I have read the Developers'
> manual about adding new indexes, and now I want to start coding the new
> index.
> 
> My first step is to create the skeleton files, but I cannot compile
> Postgres
> now because of errors. This is what I have done:
> - Create a header file in /src/includes/
> - Create a folder in /backend/access/ for the new index.
> - Created a new C file in the above folder
> - Copied a Makefile from the other access methods, and changed the
> references to point to my C file
> - Edited the /backed/access Makefile to include my new folder
> 
> I am using Eclipse on WindowsXP. Any pointers about what have I done wrong
> or anything I missed?

Well you haven't given us any errors or what c compiler you using...

Joshua D. Drake


> 
> Thanks,
> Alan
> 


-- 
     === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive  PostgreSQL solutions since 1997            http://www.commandprompt.com/

Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/



Re: New Access Method

From
Martijn van Oosterhout
Date:
On Sat, Mar 03, 2007 at 07:38:15PM +0100, Alan Gatt wrote:
> Hello,
>
> I am trying to create a new index which is multidimensional (based on
> R-Tree) which can be used for data warehosuing. I have read the Developers'
> manual about adding new indexes, and now I want to start coding the new
> index.

As stated you havn't given any details as to the actual problem.

However, you don't need to change the source tree at all to make a new
index on a type. You usually make the helper functions and then create
the operator class and you're done...

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Re: New Access Method

From
Alvaro Herrera
Date:
Alan Gatt escribió:
> Hello,
> 
> I am trying to create a new index which is multidimensional (based on
> R-Tree) which can be used for data warehosuing. I have read the Developers'
> manual about adding new indexes, and now I want to start coding the new
> index.

Have you considered coding it using the GiST infrastructure?  Should be
much easier, and automatically give crash safety, concurrency, and a
shorter development time.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


Re: New Access Method

From
"Alan Gatt"
Date:
Ok, so I am using GCC 3.2 as a compiler, and the following is the error message:

make[4]: Entering directory `/c/dev/postgres/pgsql_tip/src/backend/access/mdim'
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -g -I../../../../src/include -I./src/include/port/win32 -DEXEC_BACKEND  "-I../../../../src/include/port/win32" -DBUILDING_DLL  -c -o mdim.o mdim.c

make[4]: *** [mdim.o] Error 3
make[4]: Target `SUBSYS.o' not remade because of errors.
make[4]: Leaving directory `/c/dev/postgres/pgsql_tip/src/backend/access/mdim'
make[3]: *** [mdim-recursive] Error 2

If I choose the GIST development, do you know of any documentation which can help me?

Thanks,
Alan


On 04/03/07, Alvaro Herrera < alvherre@commandprompt.com> wrote:
Alan Gatt escribió:
> Hello,
>
> I am trying to create a new index which is multidimensional (based on
> R-Tree) which can be used for data warehosuing. I have read the Developers'
> manual about adding new indexes, and now I want to start coding the new
> index.

Have you considered coding it using the GiST infrastructure?  Should be
much easier, and automatically give crash safety, concurrency, and a
shorter development time.

--
Alvaro Herrera                                 http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

Re: New Access Method

From
"Alan Gatt"
Date:
Also, any pointers where I can find the operator classes and functions for the GIST index?

Thanks

On 04/03/07, Alan Gatt < alangatt@gmail.com> wrote:
Ok, so I am using GCC 3.2 as a compiler, and the following is the error message:

make[4]: Entering directory `/c/dev/postgres/pgsql_tip/src/backend/access/mdim'
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -g -I../../../../src/include -I./src/include/port/win32 -DEXEC_BACKEND  "-I../../../../src/include/port/win32" -DBUILDING_DLL  -c -o mdim.o mdim.c

make[4]: *** [mdim.o] Error 3
make[4]: Target `SUBSYS.o' not remade because of errors.
make[4]: Leaving directory `/c/dev/postgres/pgsql_tip/src/backend/access/mdim'
make[3]: *** [mdim-recursive] Error 2

If I choose the GIST development, do you know of any documentation which can help me?

Thanks,
Alan



On 04/03/07, Alvaro Herrera < alvherre@commandprompt.com> wrote:
Alan Gatt escribió:
> Hello,
>
> I am trying to create a new index which is multidimensional (based on
> R-Tree) which can be used for data warehosuing. I have read the Developers'
> manual about adding new indexes, and now I want to start coding the new
> index.

Have you considered coding it using the GiST infrastructure?  Should be
much easier, and automatically give crash safety, concurrency, and a
shorter development time.

--
Alvaro Herrera                                 http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


Re: New Access Method

From
Martijn van Oosterhout
Date:
On Sun, Mar 04, 2007 at 09:32:58AM +0100, Alan Gatt wrote:
> Also, any pointers where I can find the operator classes and functions for
> the GIST index?

The documentation is a good start:

http://www.postgresql.org/docs/8.1/static/gist.html

There are also plenty of examples in the contrib portion of the source
code.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Re: New Access Method

From
Tom Lane
Date:
"Alan Gatt" <alangatt@gmail.com> writes:
> make[4]: Entering directory
> `/c/dev/postgres/pgsql_tip/src/backend/access/mdim'
> gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
> -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -g
> -I../../../../src/include -I./src/include/port/win32 -DEXEC_BACKEND
> "-I../../../../src/include/port/win32" -DBUILDING_DLL  -c -o mdim.o mdim.c

> make[4]: *** [mdim.o] Error 3

Umm ... what happened to the actual compiler error message?  I'd have
expected to see something in between those lines.
        regards, tom lane