Re: [SQL] Backup Database

2007-10-31 Thread Andrew Sullivan
On Wed, Oct 31, 2007 at 10:14:33AM -0700, Joanne Salerno wrote: > I'd like to set up one as a near real-time backup to the operational > database. Is it possible to incorporate a trigger upon update (or > insert) on the operational 8.24 database to initiate an update (or > insert) on the backup

[SQL] Backup Database

2007-10-31 Thread Joanne Salerno
I have two Postgres databases (7.4 and 8.24) within the same network on LINUX platforms. Data sources go to both databases. I'd like to set up one as a near real-time backup to the operational database. Is it possible to incorporate a trigger upon update (or insert) on the operational 8.24 da

[SQL] Returning the total number of rows as a separate column when using limit

2007-10-31 Thread Andreas Joseph Krogh
Hi. AFAICS the information about the *total* number of rows is in the "result" somehow. When I execute a "limit 1" query with EXPLAIN ANALYZE, I se the total number of columns in "rows=200819", so the information is there. andreak=# EXPLAIN ANALYZE select p.id from onp_crm_person p order by p.c

Re: [SQL] puzzled by SELECT INTO

2007-10-31 Thread Gerardo Herzig
Rodrigo De León wrote: On 10/30/07, Gerardo Herzig <[EMAIL PROTECTED]> wrote: Wreird enough to me, need some advice plz! CREATE OR REPLACE FUNCTION READ_WORDS(BIGINT, INT[]) RETURNS VARCHAR AS $$ DECLARE RETURNVALUE VARCHAR; BEGIN SELECT ARRAY_TO_STRING(ARRAY( SELECT WORD