Re: [SQL] knowing which columns have beend UPDATEd inside a TRIGGER?

2000-10-25 Thread Tomas Berndtsson
Tom Lane [EMAIL PROTECTED] writes: Louis-David Mitterrand [EMAIL PROTECTED] writes: Is there a way to know which columns are being UPDATEd or INSERTEd from inside a trigger, either in C or pl/pgsql? Huh? An INSERT always inserts all columns, by definition. Some of them might be null

Re: [SQL] knowing which columns have beend UPDATEd inside a TRIGGER?

2000-10-25 Thread Louis-David Mitterrand
On Tue, Oct 24, 2000 at 06:51:03PM -0400, Tom Lane wrote: Louis-David Mitterrand [EMAIL PROTECTED] writes: Is there a way to know which columns are being UPDATEd or INSERTEd from inside a trigger, either in C or pl/pgsql? Huh? An INSERT always inserts all columns, by definition. Some of

Re: [SQL] Alternate Database Locations

2000-10-25 Thread Brian C. Doyle
Well I got it working kinda. You have set up an environment for the new directory and export it under the PGSQL super user account PGDATA2=/home/userid export PGDATA2 Then run initlocation PGDATA2 After that you have to restart your postmaster with the data dir as PGDATA2 postmaster -d

Re: [SQL] Alternate Database Locations

2000-10-25 Thread Roderick A. Anderson
On Tue, 24 Oct 2000, Brian C. Doyle wrote: Never mind... I got it working OK, don't play your cards so close to the vest. What was the problem (and solution)? TIA, Rod -- Roderick A. Anderson [EMAIL PROTECTED] Altoplanos Information Systems, Inc. Voice: 208.765.6149

[SQL] How to Return number of rows updated in stored procedure

2000-10-25 Thread Shane McEneaney
Hi, can anybody tell me how to capture the number of rows updated in an update query inside a stored procedure? This doesn't work but hopefully you will see what I mean. CREATE FUNCTION "test" () RETURNS int AS ' DECLARE v_number_of_rows int; BEGIN select into

Re: [SQL] Surprising sequence scan when function call used

2000-10-25 Thread Tom Lane
"Will Fitzgerald" [EMAIL PROTECTED] writes: vdsq= explain select * from login where login.login = lower('foo'); Seq Scan on login (cost=0.00..1361.86 rows=609 width=62) 7.0 is a little bit stupid about cross-data-type comparisons (lower() yields text, not char(n)). This example works OK in

Re: [SQL] How to call a shell command in rule

2000-10-25 Thread Clayton Cottingham
On Wed, 25 Oct 2000 10:44:48 -0700, Jie Liang said: Hi, I want send a e-mail when the rows of mytable reaches 100,000, how? one way is to make a function using perl and use say mail::sender as the module to send the info use the code snippet in perldoc Mail::Sender another

[SQL] plperl

2000-10-25 Thread Jie Liang
hi, I followed README tried to install plperl: su-2.04# cd /work/src/pgsql702/src/pl/plperl su-2.04# perl Makefile.PL Writing Makefile for plperl su-2.04# make "../../../src/Makefile.global", line 135: Need an operator "../../../src/Makefile.global", line 139: Missing dependency operator