Where to find kind code for STATISTIC_KIND GEOMETRY?

Lists: pgsql-hackerspgsql-patches
From: Ale Raza <araza(at)esri(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Where to find kind code for STATISTIC_KIND GEOMETRY?
Date: 2007-05-01 21:07:04
Message-ID: 7CAD6D9B7D16BC4A88795771E486508205AEEC9F@pianowire.esri.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

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(at)2ndquadrant(dot)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(at)esri(dot)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


From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Ale Raza <araza(at)esri(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Where to find kind code for STATISTIC_KIND GEOMETRY?
Date: 2007-05-01 22:01:46
Message-ID: 20070501220146.GB5867@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

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.


From: Ale Raza <araza(at)esri(dot)com>
To: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Where to find kind code for STATISTIC_KIND GEOMETRY?
Date: 2007-05-01 22:44:33
Message-ID: 7CAD6D9B7D16BC4A88795771E486508205AEEE34@pianowire.esri.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

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(at)commandprompt(dot)com]
Sent: Tuesday, May 01, 2007 3:02 PM
To: Ale Raza
Cc: pgsql-hackers(at)postgresql(dot)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.


From: Paul Ramsey <pramsey(at)refractions(dot)net>
To: Ale Raza <araza(at)esri(dot)com>, pgsql-hackers(at)postgresql(dot)org
Cc: John Baleja <jbaleja(at)esri(dot)com>, PostGIS Development Discussion <postgis-devel(at)postgis(dot)refractions(dot)net>
Subject: Re: Where to find kind code for STATISTIC_KIND GEOMETRY?
Date: 2007-05-01 22:57:38
Message-ID: 4637C5E2.80100@refractions.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

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(at)refractions(dot)net
Phone: 250-383-3022
Cell: 250-885-0632


From: Ale Raza <araza(at)esri(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Cc: "John Baleja" <jbaleja(at)esri(dot)com>, "PostGIS Development Discussion" <postgis-devel(at)postgis(dot)refractions(dot)net>, "Paul Ramsey" <pramsey(at)refractions(dot)net>
Subject: Re: Where to find kind code for STATISTIC_KIND GEOMETRY?
Date: 2007-05-04 16:57:58
Message-ID: 7CAD6D9B7D16BC4A88795771E486508205BF461A@pianowire.esri.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Tom,

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

Ale.

-----Original Message-----
From: Paul Ramsey [mailto:pramsey(at)refractions(dot)net]
Sent: Tuesday, May 01, 2007 3:58 PM
To: Ale Raza; pgsql-hackers(at)postgresql(dot)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(at)refractions(dot)net
Phone: 250-383-3022
Cell: 250-885-0632


From: Paul Ramsey <pramsey(at)refractions(dot)net>
To: Ale Raza <araza(at)esri(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, John Baleja <jbaleja(at)esri(dot)com>, PostGIS Development Discussion <postgis-devel(at)postgis(dot)refractions(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Where to find kind code for STATISTIC_KIND GEOMETRY?
Date: 2007-05-04 17:06:44
Message-ID: 463B6824.4010807@refractions.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

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(at)refractions(dot)net]
> Sent: Tuesday, May 01, 2007 3:58 PM
> To: Ale Raza; pgsql-hackers(at)postgresql(dot)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(at)refractions(dot)net
Phone: 250-383-3022
Cell: 250-885-0632


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Paul Ramsey <pramsey(at)refractions(dot)net>
Cc: Ale Raza <araza(at)esri(dot)com>, pgsql-hackers(at)postgresql(dot)org, John Baleja <jbaleja(at)esri(dot)com>, PostGIS Development Discussion <postgis-devel(at)postgis(dot)refractions(dot)net>
Subject: Re: Where to find kind code for STATISTIC_KIND GEOMETRY?
Date: 2007-05-04 17:17:31
Message-ID: 4510.1178299051@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Paul Ramsey <pramsey(at)refractions(dot)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


From: Ale Raza <araza(at)esri(dot)com>
To: <pgsql-patches(at)postgresql(dot)org>
Cc: <pgsql-hackers(at)postgresql(dot)org>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Paul Ramsey" <pramsey(at)refractions(dot)net>, "John Baleja" <jbaleja(at)esri(dot)com>
Subject: Patch: Allocation of "kind" codes for spatial type.
Date: 2007-05-08 15:41:16
Message-ID: 7CAD6D9B7D16BC4A88795771E486508205C7C80B@pianowire.esri.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches


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(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Friday, May 04, 2007 10:18 AM
To: Paul Ramsey
Cc: Ale Raza; pgsql-hackers(at)postgresql(dot)org; John Baleja; PostGIS
Development Discussion
Subject: Re: [HACKERS] Where to find kind code for STATISTIC_KIND
GEOMETRY?

Paul Ramsey <pramsey(at)refractions(dot)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 Content-Type Size
pg_statistic.h application/octet-stream 9.2 KB

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ale Raza <araza(at)esri(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org, "Paul Ramsey" <pramsey(at)refractions(dot)net>, "John Baleja" <jbaleja(at)esri(dot)com>
Subject: Re: Patch: Allocation of "kind" codes for spatial type.
Date: 2007-05-08 19:16:16
Message-ID: 4977.1178651776@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Ale Raza <araza(at)esri(dot)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


From: Ale Raza <araza(at)esri(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-patches(at)postgresql(dot)org>, <pgsql-hackers(at)postgresql(dot)org>, "Paul Ramsey" <pramsey(at)refractions(dot)net>, "John Baleja" <jbaleja(at)esri(dot)com>
Subject: Re: Patch: Allocation of "kind" codes for spatial type.
Date: 2007-05-08 20:47:15
Message-ID: 7CAD6D9B7D16BC4A88795771E486508205C7CC5E@pianowire.esri.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Ok, Thanks, Which release it will be in, PostgreSQL 8.2.5?

Ale.

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

Ale Raza <araza(at)esri(dot)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


From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Ale Raza <araza(at)esri(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org, Paul Ramsey <pramsey(at)refractions(dot)net>, John Baleja <jbaleja(at)esri(dot)com>
Subject: Re: [PATCHES] Patch: Allocation of "kind" codes for spatial type.
Date: 2007-05-08 20:53:05
Message-ID: 20070508205304.GO4685@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

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