[SQL] Copying a rowtype variable.

2002-11-05 Thread Rison, Stuart
Hello, Just doing a bit of PL/PGSQL so my first question is: 1) should PL/PGSQL questions be posted to the general mailing list, the sql mailing list or both? My second question is: 2) I am looking for an elegant way of copying a rowtype variable: eg. DECLARE current_row orf%ROWTYPE;

Re: [SQL] Copying a rowtype variable.

2002-11-06 Thread Rison, Stuart
>> 2) I am looking for an elegant way of copying a rowtype variable: >> >> eg. >> >> DECLARE >> current_row orf%ROWTYPE; >> previous_row orf%ROWTYPE; >> BEGIN >> >> LOOP >> -- use cursors or FOR SELECT to get values into current_row >> -- now try this: >> >> previous_row = current_row; >>

Re: [SQL] Copying a rowtype variable.

2002-11-07 Thread Rison, Stuart
Josh has submitted an appropriate report to pgsql-bugs... so perhaps it will happen! Stuart. > -Original Message- > From: Jean-Luc Lachance [mailto:jllachan@;nsd.ca] > Sent: 07 November 2002 16:29 > To: Rison, Stuart > Cc: ''[EMAIL PROTECTED]' ';

[SQL] Two TIMESTAMPs in one pl/sql function

2002-11-26 Thread Rison, Stuart
Hi, I'm trying to time a pl/sql function using a rougn and ready method, basically: print a TIMESTAMP at the begining of the function, print a TIMESTAMP at the end of the function. So...: CREATE OR REPLACE FUNCTION timer() RETURNS INTEGER AS ' DECLARE timer1 TIMESTAMP; timer2 T

[SQL] [SQL/BUGS] (possible) inconsistent behaviour of timestamp?

2002-11-26 Thread Rison, Stuart
Here's an "interesting" timestamp related postgreSQL quirk: testdb2=# select "timestamp"('now'); timestamp 2002-11-26 13:47:12.454157 (1 row) testdb2=# select 'now'::timestamp; timestamptz -- 2002-11-26 13:47:34.88358+00