Skip site navigation (1) Skip section navigation (2)

Re: query question really cant give a summary here so read the body ;-)

From: "Rhys Stewart" <rhys(dot)stewart(at)gmail(dot)com>
To: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: query question really cant give a summary here so read the body ;-)
Date: 2008-04-25 16:56:51
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
Indeed, I will endeavour to limit the length of my replies, although my
extemporaneous nature, while ranting, will invariably result in prolonged
discourse on my part . I am also grateful for your willingness to assist and
saddened that you are ill. I do hope you recovery quickly.

The example I provided earlier was a very simplified model of the table I'm
working with after a self join. The table in question contains geographic
data (linestrings) and I have written a function to return a textual
representation so that  I can easily identify lines with similar
configuration. I want to now  select  lines that are in close proximity to
each other and have the same configuration. So this requires a self join
(afaik). So, short of a function like the one that was posited earlier, is
there a method using just plain old sql to get the results I desire?

I trust the length and content of this reply is to your liking. :-)

The DDL is below and is followed by the self join that I used, if there is
room for improvement wrt the format/shcema of the table I am open to


Peace & Love|Live Long & Prosper
CREATE TABLE subsumed_secondary ( geom geometry,  id serial NOT NULL,
CONSTRAINT subsumed_secondary_pkey PRIMARY KEY (id))

On Thu, Apr 24, 2008 at 5:43 PM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>

> On Thu, Apr 24, 2008 at 3:43 PM, Rhys Stewart <rhys(dot)stewart(at)gmail(dot)com>
> wrote:
> > type). That being said, I would appreciate that any further questions I
> have
> > not be responded to by single line emails extolling the virtues of
> properly
> > designed schemata, normalization or the like.</minor rant precedes>
> Well, I would appreciate getting shorter replies that are to the point
> and don't rely on standing on soap boxes and using exercises in
> polemics to make their point, but I probably won't get that.
> The fact is, if your data is in that format, then the schema is
> working against you, and everything you do is going to be much harder
> than changing your schema to something that makes some more sense.
> Next time I'll hold your hand a bit more, but yesterday I was very far
> out of it (I'm not exactly 100% today either) with a bad head cold.
> Now, should we have more exchanges to determine who can use the most
> flowery of speech or should we talk pgsql and schema changes?

In response to


pgsql-general by date

Next:From: andy petrellaDate: 2008-04-25 17:07:02
Subject: Re: Full Text Search
Previous:From: Oleg BartunovDate: 2008-04-25 16:56:35
Subject: Re: Full Text Search

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group