Thread: Where to find kind code for STATISTIC_KIND GEOMETRY?

Where to find kind code for STATISTIC_KIND GEOMETRY?

From
Ale Raza
Date:
Simon,

I am forwarding this to pgsql-hackers. I can send the requirements once
I get the right contact.

Thanks.

Ale Raza.


-----Original Message-----
From: Simon Riggs [mailto:simon@2ndquadrant.com]
Sent: Thursday, April 26, 2007 1:02 AM
To: Ale Raza
Cc: Tom Lane; postgresql-general
Subject: Re: [GENERAL] Where to find kind code for STATISTIC_KIND
GEOMETRY?

On Wed, 2007-04-25 at 17:09 -0700, araza@esri.com wrote:

> It is mentioned in postgresql-8.2.3\src\include\catalog\pg_statistic.h
> file that the values between 100-199 are reserved for assignment by
the
> PostGIS project. Is PostgreSQL reserving these values? Do I did to
> reserve values like PotGIS is
> doing?

You just need to ask. We're keen to help everyone integrate. Code
related issues are usually discussed on pgsql-hackers.

It's possible that there's a requirements overlap between ESRI and
PostGIS, so it would be better if you could discuss it between you so we
don't have to reserve a second range of numbers for identical purposes.
I do understand there may be some licencing issues there.

--  Simon Riggs              EnterpriseDB   http://www.enterprisedb.com





Re: Where to find kind code for STATISTIC_KIND GEOMETRY?

From
Alvaro Herrera
Date:
Ale Raza wrote:
> Simon,
> 
> I am forwarding this to pgsql-hackers. I can send the requirements once
> I get the right contact.

This is it, but as Simon stated, you probably want to get the PostGIS
guys involved too, so that duplicates can be sorted out.

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


Re: Where to find kind code for STATISTIC_KIND GEOMETRY?

From
Ale Raza
Date:
Alvaro,

Where you see the duplicates? Our implementation is different than
PostGIS. Our storage type for operator class is Envelope while PostGIS
storage type is Box2d. Though, basically both are MBR but either can
change any time, so better to have separate code.

If I know PostgreSQL requirements for the code then I can see the
duplicates.

Thanks.

Ale.


-----Original Message-----
From: Alvaro Herrera [mailto:alvherre@commandprompt.com]
Sent: Tuesday, May 01, 2007 3:02 PM
To: Ale Raza
Cc: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Where to find kind code for STATISTIC_KIND
GEOMETRY?

Ale Raza wrote:
> Simon,
>
> I am forwarding this to pgsql-hackers. I can send the requirements
once
> I get the right contact.

This is it, but as Simon stated, you probably want to get the PostGIS
guys involved too, so that duplicates can be sorted out.

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



Re: Where to find kind code for STATISTIC_KIND GEOMETRY?

From
Paul Ramsey
Date:
For all that Tom reserved 100 numbers for us, we're only using one right 
now.
  lwgeom_estimate.c:47:#define STATISTIC_KIND_GEOMETRY 100

Paul


Alvaro Herrera wrote:
> Ale Raza wrote:
>> Simon,
>>
>> I am forwarding this to pgsql-hackers. I can send the requirements once
>> I get the right contact.
> 
> This is it, but as Simon stated, you probably want to get the PostGIS
> guys involved too, so that duplicates can be sorted out.
> 


-- 
  Paul Ramsey  Refractions Research  http://www.refractions.net  pramsey@refractions.net  Phone: 250-383-3022  Cell:
250-885-0632


Re: Where to find kind code for STATISTIC_KIND GEOMETRY?

From
Ale Raza
Date:
Tom,

What numbers you can reserve for our geometry type, 200 - 299?

Ale.

-----Original Message-----
From: Paul Ramsey [mailto:pramsey@refractions.net]
Sent: Tuesday, May 01, 2007 3:58 PM
To: Ale Raza; pgsql-hackers@postgresql.org
Cc: John Baleja; PostGIS Development Discussion
Subject: Re: [HACKERS] Where to find kind code for STATISTIC_KIND
GEOMETRY?

For all that Tom reserved 100 numbers for us, we're only using one right

now.
  lwgeom_estimate.c:47:#define STATISTIC_KIND_GEOMETRY 100

Paul


Alvaro Herrera wrote:
> Ale Raza wrote:
>> Simon,
>>
>> I am forwarding this to pgsql-hackers. I can send the requirements
once
>> I get the right contact.
>
> This is it, but as Simon stated, you probably want to get the PostGIS
> guys involved too, so that duplicates can be sorted out.
>


--
  Paul Ramsey  Refractions Research  http://www.refractions.net  pramsey@refractions.net  Phone: 250-383-3022  Cell:
250-885-0632



Re: Where to find kind code for STATISTIC_KIND GEOMETRY?

From
Paul Ramsey
Date:
Just take 150-199, and submit a patch to HACKERS to updates the comment 
in pg_statistic appropriately. I am sure the it will be some time before 
we invent another 49 kinds of selectivity statistic.

P

Ale Raza wrote:
> Tom,
> 
> What numbers you can reserve for our geometry type, 200 - 299?
> 
> Ale.
> 
> -----Original Message-----
> From: Paul Ramsey [mailto:pramsey@refractions.net] 
> Sent: Tuesday, May 01, 2007 3:58 PM
> To: Ale Raza; pgsql-hackers@postgresql.org
> Cc: John Baleja; PostGIS Development Discussion
> Subject: Re: [HACKERS] Where to find kind code for STATISTIC_KIND
> GEOMETRY?
> 
> For all that Tom reserved 100 numbers for us, we're only using one right
> 
> now.
> 
>    lwgeom_estimate.c:47:#define STATISTIC_KIND_GEOMETRY 100
> 
> Paul
> 
> 
> Alvaro Herrera wrote:
>> Ale Raza wrote:
>>> Simon,
>>>
>>> I am forwarding this to pgsql-hackers. I can send the requirements
> once
>>> I get the right contact.
>> This is it, but as Simon stated, you probably want to get the PostGIS
>> guys involved too, so that duplicates can be sorted out.
>>
> 
> 


-- 
  Paul Ramsey  Refractions Research  http://www.refractions.net  pramsey@refractions.net  Phone: 250-383-3022  Cell:
250-885-0632


Re: Where to find kind code for STATISTIC_KIND GEOMETRY?

From
Tom Lane
Date:
Paul Ramsey <pramsey@refractions.net> writes:
> Just take 150-199, and submit a patch to HACKERS to updates the comment 
> in pg_statistic appropriately. I am sure the it will be some time before 
> we invent another 49 kinds of selectivity statistic.

I've been on the wrong wavelength in this whole thread --- I thought the
OP wanted to know about some existing "kind" value used by PostGIS.  If
he's asking to be allocated some new "kind" values for code he intends
to write, I have no problem with giving him 200-299 ... it's not like
we seem to be in any danger of running out.  But please do submit a
patch in the style of the existing pg_statistic.h comments, showing who
controls those numbers and where they will be documented.
        regards, tom lane


Patch: Allocation of "kind" codes for spatial type.

From
Ale Raza
Date:
Tom,

Attached is the modified pg_statistic.h file for this patch. As you
mentioned 200 - 299 is reserved for ESRI st_geometry type. Out of these
values I am using code 200 for st_geometry.

Related threads for this patch:
http://archives.postgresql.org/pgsql-hackers/2007-05/msg00043.php
http://archives.postgresql.org/pgsql-general/2007-04/msg01075.php


Thanks.

Ale.

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Friday, May 04, 2007 10:18 AM
To: Paul Ramsey
Cc: Ale Raza; pgsql-hackers@postgresql.org; John Baleja; PostGIS
Development Discussion
Subject: Re: [HACKERS] Where to find kind code for STATISTIC_KIND
GEOMETRY?

Paul Ramsey <pramsey@refractions.net> writes:
> Just take 150-199, and submit a patch to HACKERS to updates the
comment
> in pg_statistic appropriately. I am sure the it will be some time
before
> we invent another 49 kinds of selectivity statistic.

I've been on the wrong wavelength in this whole thread --- I thought the
OP wanted to know about some existing "kind" value used by PostGIS.  If
he's asking to be allocated some new "kind" values for code he intends
to write, I have no problem with giving him 200-299 ... it's not like
we seem to be in any danger of running out.  But please do submit a
patch in the style of the existing pg_statistic.h comments, showing who
controls those numbers and where they will be documented.

            regards, tom lane


Attachment

Re: Patch: Allocation of "kind" codes for spatial type.

From
Tom Lane
Date:
Ale Raza <araza@esri.com> writes:
> Attached is the modified pg_statistic.h file for this patch. As you
> mentioned 200 - 299 is reserved for ESRI st_geometry type. Out of these
> values I am using code 200 for st_geometry.

Done.

For future reference, what people normally mean by a "patch" is
"diff -c" output.  Sending the whole modified file is not convenient
because it can't be dropped-in if there have been any changes since the
version you worked from (as indeed there have been, in this case).

            regards, tom lane

Re: Patch: Allocation of "kind" codes for spatial type.

From
Ale Raza
Date:
Ok, Thanks, Which release it will be in, PostgreSQL 8.2.5?

Ale.


-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Tuesday, May 08, 2007 12:16 PM
To: Ale Raza
Cc: pgsql-patches@postgresql.org; pgsql-hackers@postgresql.org; Paul
Ramsey; John Baleja
Subject: Re: [HACKERS] Patch: Allocation of "kind" codes for spatial
type.

Ale Raza <araza@esri.com> writes:
> Attached is the modified pg_statistic.h file for this patch. As you
> mentioned 200 - 299 is reserved for ESRI st_geometry type. Out of
these
> values I am using code 200 for st_geometry.

Done.

For future reference, what people normally mean by a "patch" is
"diff -c" output.  Sending the whole modified file is not convenient
because it can't be dropped-in if there have been any changes since the
version you worked from (as indeed there have been, in this case).

            regards, tom lane


Re: [PATCHES] Patch: Allocation of "kind" codes for spatial type.

From
Alvaro Herrera
Date:
Ale Raza wrote:
> Ok, Thanks, Which release it will be in, PostgreSQL 8.2.5?

8.3, but you can actually use the numbers in whatever release you
please as it is unlikely that they would have been used by anyone else
(much less somebody with which you would be sharing a database).

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support