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 error message

[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;