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 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 varchar not nul

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] 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 wrote: > On 03/14/2011 09:25 PM, Merlin Moncure wrote: > >>> Unless the point is to guarantee uniqueness of the "long-long value"s. >> >> md5 will do that too: the main thing you lose going to hash indexing >> is ordering. > > MD5 will *probably* guar

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 value"s. 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] 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 li

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 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 int, > name   varch

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 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 in UTC time, but for reaso

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 : > 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 TYPE emp_t AS ( > ID  

[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] 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

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) function

Re: [GENERAL] A simpler time zone question

2011-03-28 Thread Tom Lane
Steve Crawford 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 behavior. I've > spent a wh

Re: [GENERAL] A simpler time zone question

2011-03-28 Thread Steve Crawford
On 03/28/2011 08:57 AM, Tom Lane wrote: "Rob Richardson" 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 DS

[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 Tom Lane
"Rob Richardson" 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) regard

[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 off

[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 tim

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 make make install If you ar

[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