[ADMIN] asynchronous psql command options?

2003-01-16 Thread Christopher Smith
recently, my dsl provider went out of business, currently, I am using dial-up and I need to build indexes of a very large database table.  this take a few hours... i used psql via ssh on dial-up and closed the ssh client. I logged in again and it showed that the postmater process was still running.

[ADMIN] OT: seeking query help, where?

2003-01-16 Thread Tim Lynch
First, sorry for the OT, flame me off-list! I'm a sysadmin being impressed into dba service. i've been getting along pretty well writing queries and making reports, but i've got some questions. suggestions for a good list/forum for help? from two tables both with email_addr columns, i want a dist

[ADMIN] Do Something before Abort on Trigger ???

2003-01-16 Thread Yudha Setiawan
Somebody gimme your hand plz.   Using my previous Database I used to be like that; " ALTER TRIGGER tr_T_DtlPO ON dbo.T_DtlPO FOR UPDATE AS   bla..bla..bla...   IF @OldQty <> @NewQty BEGIN ROLLBACK  INSERT INTO T_My_ListError(fc_code,fv_descript)    VALUES('12345','No

Re: [ADMIN] OT: seeking query help, where?

2003-01-16 Thread Steve Crawford
I've never really used this site but it might be of interest: http://www.dbforums.com/ You may also want to check out "SQL Queries for Mere Mortals" (Hernandez/Viescas - Addison Wesley) -Steve On Thursday 16 January 2003 2:15 pm, Tim Lynch wrote: > First, sorry for the OT, flame me off-list!

Re: [ADMIN] OT: seeking query help, where?

2003-01-16 Thread Robert Treat
there are several ways to do this, one example would be: select distinct(email_addr) from table1 union select distinct(email_addr) from table2 You can ask questions like these on the pgsql-newbies or pgsql-sql lists if you'd like (though generally you shouldn't get flamed no matter which group yo

Re: [ADMIN] OT: seeking query help, where?

2003-01-16 Thread Bruno Wolff III
On Thu, Jan 16, 2003 at 14:15:22 -0800, Tim Lynch <[EMAIL PROTECTED]> wrote: > First, sorry for the OT, flame me off-list! > > I'm a sysadmin being impressed into dba service. i've been getting along > pretty well writing queries and making reports, but i've got some questions. > suggestions for

Re: [ADMIN] OT: seeking query help, where?

2003-01-16 Thread Devinder K Rajput
you should be able to do something like: select distinct email from test1 union (select distinct email from test2); regards, Devinder Rajput Stores Division Corporate Offices Chicago, IL (773) 442-6474 "Tim Lynch" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 01/16/2003 04:15 PM        

[ADMIN] Is There any function to get Difference of Dates

2003-01-16 Thread shreedhar
Hi All, Is There any function to get Difference of Dates. Here tdate is of type timestamp If I tried select * from temptbldate WHERE (EXTRACT(EPOCH FROM TIMESTAMP 'now()') - EXTRACT(EPOCH FROM TIMESTAMP tdate) )/ 86400 < 2 I got error as 'Parse error at tdate' select * from temptbldate WHERE

Re: [ADMIN] Is There any function to get Difference of Dates

2003-01-16 Thread shreedhar
Hi All, I got solution from the following link. http://techdocs.postgresql.org/techdocs/faqdatesintervals.php Thanks, Sreedhar - Original Message - From: "shreedhar" <[EMAIL PROTECTED]> To: "Postgres" <[EMAIL PROTECTED]> Sent: Thursday, January 16, 2003 3:06 PM Subject: [ADMIN] Is There

Re: [ADMIN] Problems with PGOPTIONS

2003-01-16 Thread Andre Schubert
On Wed, 15 Jan 2003 11:19:29 -0500 Tom Lane <[EMAIL PROTECTED]> wrote: > Andre Schubert <[EMAIL PROTECTED]> writes: > > Ok, but is there another way to enable STATS_ROW_LEVEL for a special > > backend not connecting as superuser ? > > No: the code is deliberately designed to prevent that, on the

[ADMIN] Database server time zone

2003-01-16 Thread d ravipati
Hi, Is there any command to find database server local time zone alone. SHOW TIME ZONE just displays database servers local time zone. But I need to hold output of SHOW TIME ZONE in a variable, to convert the input given in GMT to database server time zone. Is there any other way to get databa

Re: [ADMIN] Is There any function to get Difference of Dates

2003-01-16 Thread Rajesh Kumar Mallah.
what abt: select * from temptbldate WHERE current_date - date(tdate) < CAST ('2 days' AS INTERVAL) ; ? regds mallah. (EXTRACT(EPOCH FROM TIMESTAMP 'now()') - EXTRACT(EPOCH FROM TIMESTAMP tdate) )/ 86400 < 2 On Thursday 16 January 2003 03:06 pm, shreedhar wrote: > Hi All, > > Is There

Re: [ADMIN] Database server time zone

2003-01-16 Thread Bruno Wolff III
On Thu, Jan 16, 2003 at 10:58:24 -, d ravipati <[EMAIL PROTECTED]> wrote: > Hi, > Is there any command to find database server local time zone > alone. > > SHOW TIME ZONE just displays database servers local time zone. > But I need to hold output of SHOW TIME ZONE in a variable, to > co

Re: [ADMIN] Is There any function to get Difference of Dates

2003-01-16 Thread Steve Crawford
Have you tried age(now(), tdate)? Or just: .where now()-tdate < '2 days' Cheers, Steve On Thursday 16 January 2003 1:36 am, shreedhar wrote: > Hi All, > > Is There any function to get Difference of Dates. > > Here tdate is of type timestamp > > If I tried > > select * from temptbldate WHERE

Re: [ADMIN] asynchronous psql command options?

2003-01-16 Thread Bjoern Metzdorf
> i used psql via ssh on dial-up and closed the ssh client. I logged in again and it showed that the postmater process was still running.. I thought that the index building process would continue 'til completion. try ( echo '´CREATE INDEX blablabla' | psql database >> log.txt ) & on your (bash)

Re: [ADMIN] asynchronous psql command options?

2003-01-16 Thread Tom Lane
Christopher Smith <[EMAIL PROTECTED]> writes: > i used psql via ssh on dial-up and closed the ssh client. I logged in > again and it showed that the postmater process was still running.. I > thought that the index building process would continue 'til > completion. > however, this morning no indexe

[ADMIN] Determining DML is used most???

2003-01-16 Thread [EMAIL PROTECTED]
Hello All, I am using Java J2EE with CMP 2.0 with finders and selectors with a JBoss 3.0.4 application server and would like to determine which queries and other DML are being executed the most. I have thought about setting up triggers to execute and populate a table with that information every t

Re: [ADMIN] asynchronous psql command options?

2003-01-16 Thread Christopher Smith
Filesystem    Size  Used Avail Use% Mounted on/dev/sdb1  17G  2.0G   13G  13% /var/lib/pgsql/data/dev/sdd1  17G   11G  5.2G  68% /datadir correct disk space ran out.  However, just one more question... on my test server the indexes are ~8G.   I moved the data to be i

Re: [ADMIN] asynchronous psql command options?

2003-01-16 Thread Christopher Smith
disk space ran out.  Is it possible to predict the filename to be used for indexes and hence create a link to another open disk. I think that the filename used are oids? please advise  Tom Lane <[EMAIL PROTECTED]> wrote: Christopher Smith <[EMAIL PROTECTED]>writes:> i used psql via ssh on dial-up a

Re: [ADMIN] asynchronous psql command options?

2003-01-16 Thread Sean Chittenden
> recently, my dsl provider went out of business, currently, I am > using dial-up and I need to build indexes of a very large database > table. this take a few hours... > > i used psql via ssh on dial-up and closed the ssh client. I logged > in again and it showed that the postmater process was s

Re: [ADMIN] asynchronous psql command options?

2003-01-16 Thread Tom Lane
Christopher Smith <[EMAIL PROTECTED]> writes: > disk space ran out. Is it possible to predict the filename to be used > for indexes and hence create a link to another open disk. No, but you might get some joy by adjusting the pgsql_tmp subdirectory of your database to symlink to a temp directory

[ADMIN] Do Something before Abort on Trigger ???

2003-01-16 Thread Yudha Setiawan
Somebody Help Me.   Using my previous Database I used to be like that; " ALTER TRIGGER tr_T_DtlPO ON dbo.T_DtlPO FOR UPDATE AS   bla..bla..bla...   IF @OldQty <> @NewQty BEGIN ROLLBACK  INSERT INTO T_My_ListError(fc_code,fv_descript)    VALUES('12345','No Authori