Re: [GENERAL] Need help for constructing query

2011-03-28 Thread Marco
On 2011-03-27 rsmog...@softperience.eu (Radosław Smogura) wrote: Marco net...@lavabit.com Friday 25 March 2011 14:25:47 Hi, I have a table like this: id datemin max value 1 2011-03-25 20 30 17 3 2011-03-21 40 55 43 3

[GENERAL] Postgres 9 silent installation on Windows

2011-03-28 Thread Kalai R
Hi, I need to install postgres 9 silently on Windows. Kindly give the parameters list for postgres 9.0.3 Thanks Regards Kalai

Re: [GENERAL] Postgres 9 silent installation on Windows

2011-03-28 Thread Vibhor Kumar
On Mar 28, 2011, at 6:49 PM, Kalai R wrote: I need to install postgres 9 silently on Windows. Kindly give the parameters list for postgres 9.0.3 If you are using Source code to install PG9, then you can: 1. Download the source code 2. execute ./configure with configure options make

[GENERAL] How do i calculate a finish time when the start time is ambiguous?

2011-03-28 Thread Rob Richardson
Greetings! I have a table that records a starting time for a process and the length of time that process will take, and I need to calculate the time the process will end. I have the starting time both in local time and in UTC time, but for reasons which I consider totally idiotic, they are

[GENERAL] A simpler time zone question

2011-03-28 Thread Rob Richardson
I see that the query select '2011-11-6 00:59'::timestamptz' returns a timestamptz with a time zone of -4, which is correct, since I'm in the Eastern time zone and the change from EDT to EST will happen at 2011-11-6 02:00. The query select '2011-11-6 01:01'::timestamptz gives me a time zone offset

Re: [GENERAL] A simpler time zone question

2011-03-28 Thread Tom Lane
Rob Richardson rob.richard...@rad-con.com writes: Will PostgreSQL always assume that an ambiguous time is in standard instead of daylight time? Yes, I believe that's even documented somewhere. I think it will also do that if the time is impossible (eg, 02:30 during a forward DST jump)

[GENERAL] What could keep a connection / query alive?

2011-03-28 Thread Derrick Rice
Hi folks, I'm investigating (using 8.2) an instance of a database client connection remaining open in a single query well past statement timeout settings. I understand that severed TCP connections can cause the backend to hang until the connection is closed, but our tcp keepalive settings should

Re: [GENERAL] A simpler time zone question

2011-03-28 Thread Steve Crawford
On 03/28/2011 08:57 AM, Tom Lane wrote: Rob Richardsonrob.richard...@rad-con.com writes: Will PostgreSQL always assume that an ambiguous time is in standard instead of daylight time? Yes, I believe that's even documented somewhere. I think it will also do that if the time is impossible (eg,

Re: [GENERAL] A simpler time zone question

2011-03-28 Thread Tom Lane
Steve Crawford scrawf...@pinpointresearch.com writes: On 03/28/2011 08:57 AM, Tom Lane wrote: Yes, I believe that's even documented somewhere. I think it will also do that if the time is impossible (eg, 02:30 during a forward DST jump) I'd love a link to the documentation specifying that

Re: [GENERAL] Disk space usage analyzer?

2011-03-28 Thread Steve Crawford
On 03/25/2011 07:58 PM, Yang Zhang wrote: Is there any tool for breaking down how much disk space is used by (could be freed by removing) various tables, indexes, selected rows, etc.? Thanks! You can use the pg_class table and the pg_relation_size (and optionally the pg_size_pretty)

Re: [GENERAL] Disk space usage analyzer?

2011-03-28 Thread Nicholson, Brad (Toronto, ON, CA)
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- ow...@postgresql.org] On Behalf Of Steve Crawford Sent: Monday, March 28, 2011 12:22 PM To: Yang Zhang Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Disk space usage analyzer? On

[GENERAL] can a function have a setof (returned from another function) as input

2011-03-28 Thread Terry Kop
I'm trying to create a function that will take setof results from various other functions (they all produce the same output format). Is this possible? if so how do call it. ex. CREATE TYPE emp_t AS ( ID int, name varchar(10), age int, salary real, start_date date, city

Re: [GENERAL] can a function have a setof (returned from another function) as input

2011-03-28 Thread Pavel Stehule
Hello 2011/3/28 Terry Kop terry@clearcapital.com: I'm trying to create a function that will take setof results from various other functions (they all produce the same output format). Is this possible? if so how do call it. No, this isn't possible. Regards Pavel Stehule ex. CREATE

Re: [GENERAL] How do i calculate a finish time when the start time is ambiguous?

2011-03-28 Thread Octavio Alvarez
On Mon, 28 Mar 2011 08:26:03 -0700, Rob Richardson rob.richard...@rad-con.com wrote: I have a table that records a starting time for a process and the length of time that process will take, and I need to calculate the time the process will end. I have the starting time both in local time and

Re: [GENERAL] can a function have a setof (returned from another function) as input

2011-03-28 Thread Merlin Moncure
On Mon, Mar 28, 2011 at 1:55 PM, Terry Kop terry@clearcapital.com wrote: I'm trying to create a function that will take setof results from various other functions (they all produce the same output format). Is this possible? if so how do call it. ex. CREATE TYPE emp_t AS ( ID

Re: [GENERAL] Autocommit off - commits/rollbacks

2011-03-28 Thread Craig Ringer
On 03/14/2011 10:55 PM, Vogt, Michael wrote: Hey all I have a question, using the autocommit off option in postgres. As starting position I use a table called xxx.configuration using a unique id constraint. Why does postgres rollback the whole transaction after an error? It's a PostgreSQL

Re: [GENERAL] Values larger than 1/3 of a buffer page cannot be indexed.

2011-03-28 Thread Craig Ringer
On 03/14/2011 09:25 PM, Merlin Moncure wrote: Unless the point is to guarantee uniqueness of the long-long values. md5 will do that too: the main thing you lose going to hash indexing is ordering. MD5 will *probably* guarantee the uniqueness of the values. Personally I'm not a big fan of

Re: [GENERAL] Values larger than 1/3 of a buffer page cannot be indexed.

2011-03-28 Thread Merlin Moncure
On Mon, Mar 28, 2011 at 10:28 PM, Craig Ringer cr...@postnewspapers.com.au wrote: On 03/14/2011 09:25 PM, Merlin Moncure wrote: Unless the point is to guarantee uniqueness of the long-long values. md5 will do that too: the main thing you lose going to hash indexing is ordering. MD5 will

Re: [GENERAL] Out of memory

2011-03-28 Thread Jeremy Palmer
I'm wondering if there is a way to estimate the total amount of work memory that will be used for a single query (or more specifically a plpgsql function that runs a series of queries) The database that I'm setting up is a data warehouse which typically only has one query running at any given

Re: [GENERAL] Using data for column names in plpgsql

2011-03-28 Thread Merlin Moncure
On Fri, Mar 25, 2011 at 6:18 PM, Jake Stride j...@stride.me.uk wrote: Hi I'm attempting to do some partitioning in a database and am wondering if I can use the data being inserted to insert into new schema. I have the following in the public schema: create table test (id serial, note