[GENERAL] archive_command question

2009-03-16 Thread dcrespo
Hi, When setting archive_command in postgresql.conf to something different than '', in other words, not empty, does it mean that archiving will be attempted periodically since postgresql starts or just when doing pg_start_backup and pg_stop_backup? I just use archived files for recovery process

Re: [GENERAL] alter multiple tables

2009-03-16 Thread dcrespo
On Mar 16, 12:08 pm, t...@wildenhain.de (Tino Wildenhain) wrote: Since I have a lot of tables and mirrored backups, I am wondering if there is a way to alter automatically all tables where colname matches 'username' Is there a way to do this? Enter psql with '-E' flag, and see the query

[GENERAL] Query Performance Test

2007-11-17 Thread dcrespo
Hello, All. I have a query that I want to test twice to see its performance with and without another program running (anti-virus program). I know that if you run the same query for the second time, it will be faster than the first time. So, how can I do to execute it as if it was the first time

[GENERAL] Solved: Getting the field names for a given table

2007-08-09 Thread dcrespo
For those who need to know the fields that a certain table has in a postgresql database, here is the SQL statement: SELECT DISTINCT attname, relname FROM pg_attribute pa, pg_class pc, pg_tables pt WHERE pa.attrelid=pc.oid AND pc.relname=pt.tablename AND pt.schemaname='public' AND attstattarget=-1

[GENERAL] Best possible way of exporting data to a generic file format

2007-07-03 Thread dcrespo
Hi, I'm working on an extraction tool that should unload timestamp-ranged data from every table of a selected schema under postgresql database, and store its result into a file so it can be loaded into any database. I don't know what tables I'm going to dump, but I do know what fields should be

Re: [GENERAL] Evaluate only one CASE WHEN in a select

2007-04-13 Thread dcrespo
On Apr 12, 4:30 pm, [EMAIL PROTECTED] (Tom Lane) wrote: dcrespo [EMAIL PROTECTED] writes: They are exactly the same, that's why I want to evaluate it only once and, depending on it, put the corresponding value into two different fields that must be returned, instead of evaluating once

Re: [GENERAL] Evaluate only one CASE WHEN in a select

2007-04-12 Thread dcrespo
On Apr 11, 11:35 pm, [EMAIL PROTECTED] (Guy Rouillier) wrote: dcrespo wrote: Hi everybody, I'm implementing something like this: SELECT CASE WHEN add_numbers(t1.main_number,t2.main_number)100 THEN t1.description1 ELSE t2.description1 END

[GENERAL] Evaluate only one CASE WHEN in a select

2007-04-11 Thread dcrespo
Hi everybody, I'm implementing something like this: SELECT CASE WHEN add_numbers(t1.main_number,t2.main_number)100 THEN t1.description1 ELSE t2.description1 END AS number_description1, CASE WHEN add_numbers(t1.main_number,t2.main_number)100 THEN

Re: [GENERAL] Postgres Replication

2007-01-10 Thread dcrespo
-level package that is like raid-1 over the network. On Tue, 9 Jan 2007, dcrespo wrote: Hi everybody, I have two computers with a Postgres Database each. I want one of them to be the replica of the other one; let's say I want a Master to Master replication in order to use either one

Re: [GENERAL] Postgres Replication

2007-01-10 Thread dcrespo
Good question. The only concern that I have is the date of the last version (2005-3-7). Do you or anybody know if this software (PGCluster) is stable and works fine? Please, give information on how it fits your needs. Thank you! Daniel km wrote: On Tue, Jan 09, 2007 at 12:17:20PM -0600, Scott

[GENERAL] Postgres Replication

2007-01-09 Thread dcrespo
Hi everybody, I have two computers with a Postgres Database each. I want one of them to be the replica of the other one; let's say I want a Master to Master replication in order to use either one (but only one at a time) as the main database: in case of failure, switch. The ideal synchronization