[GENERAL] How to recover database instance from a disaster

2007-09-14 Thread Chansup Byun
Hi, I'm supporting Sun Grid Engine and it uses Postgres DB as a backend server for ARCo accounting and reporting module. One of my customers is asking how to recover data if Postgres DB server got crashed. SGE constantly generates accounting data and records them into Postgres DB. I think on

Re: [GENERAL] What is the best way to merge two disjoint tables?

2007-09-07 Thread Chansup Byun
Rodrigo De León wrote: On 9/7/07, Chansup Byun <[EMAIL PROTECTED]> wrote: Can someone show me an example SQL statement? I suppose you could add a constant, non-overlapping number to add to the duplicate IDs, say 1000, and then this: SELECT COALESCE(T1.U_USER, T2.U_USER) AS

[GENERAL] What is the best way to merge two disjoint tables?

2007-09-07 Thread Chansup Byun
Hi Gurus, I have two disjoint tables, for examples, of user lists. Some users appear both tables. They may or may not have the same u_id. Some users only appear one table. I would like to merge tableB into tableA with the condition that each user has a unique id. Also I would like to keep u_id

Re: [GENERAL] A trigger question

2006-12-25 Thread Chansup Byun
On 12/20/06, Bruno Wolff III <[EMAIL PROTECTED]> wrote: On Mon, Dec 18, 2006 at 22:18:43 -0500, Chansup Byun <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to set up a trigger to prevent any duplicate entries into > my table. But I couldn't figure out how to m

[GENERAL] A trigger question

2006-12-19 Thread Chansup Byun
Hi, I'm trying to set up a trigger to prevent any duplicate entries into my table. But I couldn't figure out how to make my trigger work. I have a PostgreSQL 8.1.5 installation. I created the following table: CREATE TABLE attendance ( attendance_id serial, service_date timestam