Re: [HACKERS] help with PL/PgSQL bug

2003-01-12 Thread Gavin Sherry
On Sat, 11 Jan 2003, Tom Lane wrote: > "Mike Mascari" <[EMAIL PROTECTED]> writes: > > From: "Tom Lane" <[EMAIL PROTECTED]> > >> That's a rowtype variable, though, not a record variable. I believe our > >> code will work the same as Oracle for that case. > > > 4 TYPE EmpRec IS RECORD ( > > 5

Re: [HACKERS] help with PL/PgSQL bug

2003-01-12 Thread Mike Mascari
- Original Message - From: "Tom Lane" <[EMAIL PROTECTED]> > "Mike Mascari" <[EMAIL PROTECTED]> writes: > > From: "Tom Lane" <[EMAIL PROTECTED]> > >> That's a rowtype variable, though, not a record variable. I believe our > >> code will work the same as Oracle for that case. > > > 4 TY

Re: [HACKERS] help with PL/PgSQL bug

2003-01-11 Thread Mike Mascari
- Original Message - From: "Tom Lane" <[EMAIL PROTECTED]> > "Mike Mascari" <[EMAIL PROTECTED]> writes: > >> Does Oracle's PL/SQL have a concept of record variables? If so, what > >> do they do in this situation? > > > In Oracle 8, a row of NULLs: > > > 1 CREATE OR REPLACE FUNCTION fo

Re: [HACKERS] help with PL/PgSQL bug

2003-01-10 Thread Tom Lane
"Mike Mascari" <[EMAIL PROTECTED]> writes: >> Does Oracle's PL/SQL have a concept of record variables? If so, what >> do they do in this situation? > In Oracle 8, a row of NULLs: > 1 CREATE OR REPLACE FUNCTION foo(t IN NUMBER) > 2 RETURN NUMBER > 3 IS > 4 emp_rec employees%ROWTYPE;

Re: [HACKERS] help with PL/PgSQL bug

2003-01-10 Thread Mike Mascari
- Original Message - From: "Tom Lane" <[EMAIL PROTECTED]> > Neil Conway <[EMAIL PROTECTED]> writes: > > On Fri, 2003-01-10 at 20:28, Tom Lane wrote: > >> Clearly, RETURN NEXT with an undefined record variable shouldn't dump > >> core, but what should it do? Raise an error, or perhaps be a

Re: [HACKERS] help with PL/PgSQL bug

2003-01-10 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > On Fri, 2003-01-10 at 20:28, Tom Lane wrote: >> Clearly, RETURN NEXT with an undefined record variable shouldn't dump >> core, but what should it do? Raise an error, or perhaps be a no-op? > I'd vote for making it a no-op. Raising an error is too severe fo

Re: [HACKERS] help with PL/PgSQL bug

2003-01-10 Thread Neil Conway
On Fri, 2003-01-10 at 20:28, Tom Lane wrote: > The core dump appears to occur when the SELECT INTO fails to retrieve > a row, leaving "finalrec" undefined. Thanks very much for your help, Tom. > Clearly, RETURN NEXT with an undefined record variable shouldn't dump > core, but what should it do? R

Re: [HACKERS] help with PL/PgSQL bug

2003-01-10 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > Someone contacted me in IRC about a bug in PL/PgSQL. I've confirmed that > the example SQL they sent me causes a segfault on my machine (CVS HEAD), > but I've so far not had a lot of success tracking down the exact cause > of the problem. The core dump app

[HACKERS] help with PL/PgSQL bug

2003-01-10 Thread Neil Conway
Folks, Someone contacted me in IRC about a bug in PL/PgSQL. I've confirmed that the example SQL they sent me causes a segfault on my machine (CVS HEAD), but I've so far not had a lot of success tracking down the exact cause of the problem. Backtrace: #0 0x403ed17a in compatible_tupdesc (td1=0x8