[SQL] invoke an external shell script from a function
Does anyone know how to invoke an external shell script from a function when it is called from a sql statement? -- Artemis Chau, Intel Corp.
Re: [SQL] invoke an external shell script from a function
Chau, Artemis writes: > Does anyone know how to invoke an external shell script from a function when > it is called from a sql statement? If it's a C function, use system("file"). -- Peter Eisentraut [EMAIL PROTECTED] http://yi.org/peter-e/
[SQL] timestamp difference in hours? (fwd)
-- Forwarded message -- Date: Sat, 23 Sep 2000 15:58:06 +0200 (CEST) From: Alessandro Rossi <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: timestamp difference in hours? I found in a post from Jeff MacDonald the following example: bignose=> \d foo Table "foo" Attribute | Type| Modifier ---+---+-- start | timestamp | stop | timestamp | bignose=> select start,stop, stop-start as start_stop from foo; start | stop | start_stop ++ 2000-06-22 20:37:12-03 | 2000-06-22 20:37:12-03 | 00:000 2000-06-22 20:40:40-03 | 2000-06-23 20:40:40-03 | 1 00:00 2000-06-22 20:40:53-03 | 2000-09-30 20:40:53-03 | 100 00:00 2000-06-22 20:41:08-03 | 2000-06-23 02:41:08-03 | 06:00 2000-06-22 20:41:30-03 | 2010-11-22 19:41:30-04 | 3805 00:00 (5 rows) Is it possible to get the start_stop field in hours ? And not in days, hours ? ex: 1 00:00-> 24:00 In postgres what is the difference between the type datetime and timestamp? Thanks in advance Alex
[SQL] Transaction isolation level for plpgsql
Hi all, Does anybody know the transaction isolation level default when a plpgsql stored procedure is called? Is it possible to set it? Or is this controlled by SPI? Cheers, Keith.
Re: [SQL] invoke an external shell script from a function
Peter Eisentraut wrote: > > Chau, Artemis writes: > > > Does anyone know how to invoke an external shell script from a function when > > it is called from a sql statement? > > If it's a C function, use system("file"). Is this the only way to do this? I would also like to have a trigger call an external program. Is there a good place to go for more info on this? TIA
Re: [SQL] More efficient DELETE ... ?
Just a reminder that this is taken care of. It only WARNs in cases where we suspect they really made a mistake. test=> select * from pg_class s where pg_class.oid =34; NOTICE: Adding missing FROM-clause entry for table pg_class > Bruce Momjian <[EMAIL PROTECTED]> writes: > > In fact, someone can just remove the #ifdef WARN_FROM defines around the > > code and regenerate the regression tests and all will stay in sync. > > IIRC, Thomas felt that his outer join changes were going to break those > warnings anyway --- that's why we had them commented out. No point in > trying to turn them on until the outer-join dust settles. > > regards, tom lane > > > > -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup.| Drexel Hill, Pennsylvania 19026