Re: [GENERAL] PDF Documentation for 8.3?

2008-09-21 Thread Sven Marcel Buchholz
Michelle Konzack schrieb: > Hello, > > I am using Debian GNU/Linux Etch with PostgreSQL 8.1.11 and since the > next release of Debian will use 8.3 I am searching for documentation > which can be print out... > > Ma last Printed version was "Practical PostgreSQL" from O'Reilly which > cover

[GENERAL] R-tree, order by, limit

2008-09-21 Thread Anton Belyaev
Hello, I am implementing a map application. There are towns with altitude, longitude and population. One of the tasks is to be able to query N biggest (by population) towns within a rectangle. Something like (maybe the syntax in not quite right, but the idea is obvious): SELECT * FROM towns where

Re: [GENERAL] R-tree, order by, limit

2008-09-21 Thread Volkan YAZICI
On Sun, 21 Sep 2008, "Anton Belyaev" <[EMAIL PROTECTED]> writes: > SELECT * FROM towns where alt1 <= alt <= alt2 AND long1 <= long <= > long2 ORDER BY population LIMIT 10; You're absolutely on the wrong path. Don't try to implement a logic, that has been implemented by PostgreSQL in the most possi

Re: [GENERAL] R-tree, order by, limit

2008-09-21 Thread Anton Belyaev
2008/9/21 Volkan YAZICI <[EMAIL PROTECTED]>: > On Sun, 21 Sep 2008, "Anton Belyaev" <[EMAIL PROTECTED]> writes: >> SELECT * FROM towns where alt1 <= alt <= alt2 AND long1 <= long <= >> long2 ORDER BY population LIMIT 10; > > You're absolutely on the wrong path. Don't try to implement a logic, > tha

Re: [GENERAL] R-tree, order by, limit

2008-09-21 Thread Anton Belyaev
2008/9/21 Anton Belyaev <[EMAIL PROTECTED]>: > Hello, > > I am implementing a map application. There are towns with altitude, > longitude and population. > One of the tasks is to be able to query N biggest (by population) > towns within a rectangle. > > Something like (maybe the syntax in not quite

Re: [GENERAL] PDF Documentation for 8.3?

2008-09-21 Thread Kevin Hunter
At 1:50am -0400 on Sun, 21 Sep 2008, Joshua D. Drake wrote: > Kevin Hunter wrote: >> http://www.postgresql.org/docs/manuals/ >> >> Hmm, this page seems to advertise both US Letter and A4. A cursory >> inspection suggests that the A4 document at least has larger pages and >> less of them ... > > F

Re: [GENERAL] R-tree, order by, limit

2008-09-21 Thread Martijn van Oosterhout
On Sun, Sep 21, 2008 at 06:17:39PM +0400, Anton Belyaev wrote: > Geometry types and functions use R-tree indexes anyways. > > I can rephrase the query using geometry language of Postgres: > SELECT * FROM towns WHERE towns.coordinates <@ box(alt1, long1, alt2, > long2) ORDER BY population LIMIT 10;

[GENERAL] PL/Python - Execute return results

2008-09-21 Thread Dean Grubb
Hi, plan = plpy.prepare("SELECT last_name FROM my_users WHERE first_name = $1", [ "text" ]) rv = plpy.execute(plan, [ "name" ], 5) return rv["last_name"] If the SELECT command does not return any results, how do I catch/check for this? if rv == {} ? or maybe try: rv = plpy.execute(plan, [ "n

Re: [GENERAL] i can't drop an idex

2008-09-21 Thread Craig Ringer
Pau Marc Munoz Torres wrote: > but when i try to fo it I get the following error > > mhc2db=> drop index antic; > > ERROR: could not open relation with OID 596166 You might want to provide some more details, like: - Your operating system and version - What version of PostgreSQL you are using

[GENERAL] Triggers not working

2008-09-21 Thread Dale Harris
Hi, I'm running PostgreSQL 8.3.3 and I'm having trouble with triggers not always working. I have the following tables and functions as documented below. My problem is that if I perform an update on the Entity table and modify the Code field, why doesn't the trigger for the Entity table execut

[GENERAL] Largest PostgreSQL 8.x DB someone is running?

2008-09-21 Thread Keaton Adams
What is the the largest PostgreSQL 8.x database that is running in a production environment that you are aware of? We top out at roughly 400 GB but have a need for a new project to go much, much larger (in the several TB range). I am attempting to get a feel for how large one should take a sin

Re: [GENERAL] Largest PostgreSQL 8.x DB someone is running?

2008-09-21 Thread Klint Gore
Keaton Adams wrote: What is the the largest PostgreSQL 8.x database that is running in a production environment that you are aware of? We top out at roughly 400 GB but have a need for a new project to go much, much larger (in the several TB range). I am attempting to get a feel for how large

Re: [GENERAL] Largest PostgreSQL 8.x DB someone is running?

2008-09-21 Thread Joshua D. Drake
Keaton Adams wrote: What is the the largest PostgreSQL 8.x database that is running in a production environment that you are aware of? We top out at roughly 400 GB but have a need for a new project to go much, much larger (in the several TB range). I am attempting to get a feel for how large

Re: [GENERAL] Largest PostgreSQL 8.x DB someone is running?

2008-09-21 Thread Scott Marlowe
On Sun, Sep 21, 2008 at 10:14 PM, Keaton Adams <[EMAIL PROTECTED]> wrote: > What is the the largest PostgreSQL 8.x database that is running in a > production environment that you are aware of? We top out at roughly 400 GB > but have a need for a new project to go much, much larger (in the several

Re: [GENERAL] PDF Documentation for 8.3?

2008-09-21 Thread Reg Me Please
NOthing bad, except that a number of tables are actually unreadable and some code example lines are going past the right margin. Apart of this, I would say it's great documentation. On Sunday 21 September 2008 11:52:44 Sven Marcel Buchholz wrote: > Michelle Konzack schrieb: > > Hello, > > > > I a

[GENERAL] Query not using index

2008-09-21 Thread Troy Rasiah
hello all, I'm having troubles getting the following statement to use the index on 'gazette'. If i remove the order by condition it then uses the index. Below is the explain analyse. The first explain analyse is the one i'm having problems with. The second explain analyse is from a different d

Re: [GENERAL] PL/Python - Execute return results

2008-09-21 Thread Tino Wildenhain
Hi, Dean Grubb wrote: Hi, plan = plpy.prepare("SELECT last_name FROM my_users WHERE first_name = $1", [ "text" ]) rv = plpy.execute(plan, [ "name" ], 5) return rv["last_name"] If the SELECT command does not return any results, how do I catch/check for this? I'm surprised to find you directly