Re: [HACKERS] Enum type emulation: problem with opaque type in PL/pgSQL functions

2000-11-24 Thread Tom Lane
Max Fonin <[EMAIL PROTECTED]> writes: > Tom Lane <[EMAIL PROTECTED]> wrote: I guess the problem is that PL/pgSQL doesn't handle opaque type correctly. >> >> No it doesn't, which is not surprising considering that opaque isn't >> really a type at all. The error message could be improved thou

Re: [HACKERS] Enum type emulation: problem with opaque type in PL/pgSQL functions

2000-11-24 Thread Max Fonin
On Thu, 23 Nov 2000 11:13:28 -0500 Tom Lane <[EMAIL PROTECTED]> wrote: > Max Fonin <[EMAIL PROTECTED]> writes: > > I guess the problem is that PL/pgSQL doesn't handle opaque type correctly. > > No it doesn't, which is not surprising considering that opaque isn't > really a type at all. The erro

Re: [HACKERS] Enum type emulation: problem with opaque type in PL/pgSQL functions

2000-11-23 Thread Tom Lane
Max Fonin <[EMAIL PROTECTED]> writes: > I guess the problem is that PL/pgSQL doesn't handle opaque type correctly. No it doesn't, which is not surprising considering that opaque isn't really a type at all. The error message could be improved though :-( Currently I believe that the only way to w

[HACKERS] Enum type emulation: problem with opaque type in PL/pgSQL functions

2000-11-23 Thread Max Fonin
Guys, hello. Here is a problem. -- -- Creating 2 new functions and new type -- BEGIN; CREATE FUNCTION enum_week_in (opaque) RETURNS int2 AS ' DECLARE invalue ALIAS for $1; BEGIN IF invalue= OR invalue=''0'' THEN RETURN 0; END IF;