[GENERAL] CUBE SYNTAX

2007-05-27 Thread ABHANG RANE

Hi,
I need to use the cube operator in postgresql 8.2. Whats the syntax for 
the cube or a link to the documentation which clearly explains how to 
use cube operator syntactically.


Thanks
Abhang


---(end of broadcast)---
TIP 6: explain analyze is your friend


[GENERAL] cube

2007-05-27 Thread ABHANG RANE

Hi,
Can you please let me know if anyone has used cube.c file in 
postgresql. I have installed the contrib modules required, but I just 
need to know how to implement cube operator on a table.


Thanks
Abhang


---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
  choose an index scan if your joining column's datatypes do not
  match


[GENERAL] opclass for real[]

2007-05-29 Thread ABHANG RANE

Hi,
I have a column real[] in my table. I need to create a gist index on 
it. But the error is obvious as follows.


ERROR:  data type real[] has no default operator class for access 
method "gist"
HINT:  You must specify an operator class for the index or define a 
default operator class for the data type.


Is there a opclass defined in 8.2 or I have to create one. In either 
case can you please give a link for information on opclasses.


Thanks
Abhang


---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


[GENERAL] REMOTE CONNECTION

2007-05-30 Thread ABHANG RANE

Hi,
I have installed postgre 8.2.4. I tried to modify the pg_hba.conf and 
.conf file for allowing remote connection but it did not work. The 
server is a linux machine. I am trying to connect with my laptop by ssh 
client. Please may I know what other parameters need to be tweaked. I 
get an error like is the server running locally or is it accepting TCP 
connections.


Thanks
Abhang


---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


[GENERAL] COPY error

2007-06-04 Thread ABHANG RANE

Hi,
Im trying to load data from a file using copy command. At the end of 
the data, I have appended copy statement as


copy tablename(col1, col2) from stdin with delimiter as '\t';
.\

But I get following error.
ERROR:  syntax error at or near "2713"
LINE 1: 2713 {3.70952,1.45728,0.134339,3.99197,2.22381,-0.435095,6.9...
   ^
invalid command \.


Thanks
Abhang



---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

  http://www.postgresql.org/docs/faq


[GENERAL] function problem

2007-06-06 Thread ABHANG RANE

Hi,
I have written a function called similarity in postgresql which accepts 
real[] as argument. I then call it by saying


select * from similarity('{1.232,5., 5.100, 1}');

I get this error.

Could not choose a best candidate function. You may need to add 
explicit type casts.


Is it the way I call is wrong?

Thanks
Abhang


---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
  choose an index scan if your joining column's datatypes do not
  match


[GENERAL] cube for real[]

2007-06-06 Thread ABHANG RANE

Hi,
I have a table with one column as real[]. Now if I want to make cubes 
out of each of these arrays, is there a way in postgre I can do it. I 
guess cube operator is not defined for real[] but can I create cubes if 
the column was integer[]. If yes please may I know how.


Thanks
Abhang


---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


[GENERAL] cube for real[]

2007-06-07 Thread ABHANG RANE

Hi,
I have a table with one column as real[]. Now if I want to make cubes 
out of each of
these arrays, is there a way in postgre I can do it. I guess cube 
operator is not defined
for real[] but can I create cubes if the column was integer[]. If yes 
please may I know

how.

Thanks
Abhang


---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


[GENERAL] cube problem

2007-06-07 Thread ABHANG RANE

Hi,
I have a table with one column as real[]. Now if I want to make cubes 
out of each of
these arrays, is there a way in postgre I can do it. I guess cube 
operator is not defined
for real[] but can I create cubes if the column was integer[]. If yes 
please may I know

how.

Actually I would pass an real[] array to a function. I want to create a 
cube out of this
so that, somehow I can calculate the distance between this cube and 
each row in the table
which has a column of real[]. So I would have to create a cube for each 
row in the table.
I can write a function which accepts array and calculate such distance 
in C but thats too

slow since there are 10 million rows.

Thanks
Abhang


---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
  choose an index scan if your joining column's datatypes do not
  match


[GENERAL] gist index on cube column

2007-06-09 Thread ABHANG RANE

Hi,
I had some doubts about the gist index on cube column. So if I have a 
column of type cube and create a gist index on it, would the index be 
on individual elements in the cube or the cube as a whole. I mean will 
a gist index on cube column improve the performance of earthdistance 
function or cube_distance function.


Thanks
Abhang


---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


[GENERAL] FUNCTION DEFINITION

2007-06-22 Thread ABHANG RANE

Hi,
If I have created a plpgsql function, is there a way I can look again 
at the create statement of that function. I need to know what exactly 
is there in the function.


Thanks
Abhang


---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

  http://www.postgresql.org/docs/faq


[GENERAL] cube operations

2007-05-16 Thread ABHANG RANE

Hi,
I have a array column which has 12 real values in it. Basically these 
values represent co-ordinates in 12 dimensions for a substance. My main 
need is to find substances similar to a particular compound. Now I can 
do by calculating differences with each array in the whole table. But 
the table has millions of rows. So I need some kinda higher dimensional 
index. I have read about the cube operation in postgre, can it be 
extended to 12 dimensions or something like that.


Thanks
Abhang


---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [GENERAL] cube operations

2007-05-17 Thread ABHANG RANE

Hi,
But now having 12 columns and multicolumn index, wont this slow down 
the search process. I mean in general retrieving 12 columns using a 
multicolumn index is slower or faster compared to an index on a 12 size 
array?


Thanks
Abhang
Quoting "John D. Burger" <[EMAIL PROTECTED]>:


ABHANG RANE wrote:


I have a array column which has 12 real values in it. Basically
these values represent co-ordinates in 12 dimensions for a
substance. My main need is to find substances similar to a
particular compound. Now I can do by calculating differences with
each array in the whole table. But the table has millions of rows.
So I need some kinda higher dimensional index.


Is there any particular reason you're using an array?  If every row
has all twelve values, I'd just make them columns.  Then I could use
a multi-column index.


I have read about the cube operation in postgre, can it be extended
to 12 dimensions or something like that.


I have no experience with CUBE, but I think it's just a kind of
summarization aggregate.

It sounds like you want the Nearest Neighbor(s) of your "particular
compound".  You might to read about that:

http://en.wikipedia.org/wiki/Nearest_neighbor_search

- John Burger
  G63

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly






---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

  http://www.postgresql.org/docs/faq


[GENERAL] contrib

2007-05-17 Thread ABHANG RANE

Hi,
I have installed postgresql 8.2 on redhat enterprise release WS 4. I 
need to use the cube operator which I guess resides in the contrib 
modules. Please may I know the link to install the appropricate contrib 
module for my linux machine.


Thanks
Abhang


---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


[GENERAL] contirb install

2007-05-18 Thread ABHANG RANE

Hi,
I have redhat enterprpise release 4. I need to use the cube operator. 
Please can you let me know to install the necessary contrib modules. I 
tried to make in the directory of the contrib but it says


Makefile:23: ../../src/Makefile.global: No such file or directory
Makefile:24: /contrib/contrib-global.mk: No such file or directory
make: *** No rule to make target `/contrib/contrib-global.mk'.  Stop.

Since I ma a university student, there is postgre 7.4 in the shared 
directory and I have installed 8.2 version in a separate folder which 
is assigned to me.


Thanks
Abhang


---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster