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

From Rhys Stewart
Subject Re: query question really cant give a summary here so read the body ;-)
Date
Msg-id 189966030804250956j6af0c8e4q527697c054f28751@mail.gmail.com
Whole thread Raw
In response to Re: query question really cant give a summary here so read the body ;-)  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Responses Re: query question really cant give a summary here so read the body ;-)  (Colin Wetherbee <cww@denterprises.org>)
List 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 suggestions.



Rhys

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.marlowe@gmail.com> wrote:
On Thu, Apr 24, 2008 at 3:43 PM, Rhys Stewart <rhys.stewart@gmail.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?

pgsql-general by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: Full Text Search
Next
From: "andy petrella"
Date:
Subject: Re: Full Text Search