The following bug has been logged online:
Bug reference: 3328
Logged by: Sergey Morgalev
Email address: sergo(at)virtonomica(dot)ru
PostgreSQL version: 8.2.4
Operating system: windows xp, free bsd
Description: initialization complex types with domain column
When user defined complex type with user defined DOMAIN with NOT NULL AND
DEFAULT attrubute, postgres can't initialize variable in DECLARE section of
-- create some DOMAIN
CREATE DOMAIN my_domain AS numeric DEFAULT 0 NOT NULL;
-- create complex type
CREATE TYPE t_my_type AS (
does not allow the declare variable with type 't_my_type' in a FUNCTION
CREATE OR REPLACE FUNCTION m_function() RETURNS SETOF t_my_type AS $$
------- skipped ------
ERROR: domain my_domain does not allow null values
CONTEXT: PL/pgSQL function "my_function" line 4 at block variables
will declare the '_my_var' variable with type 'RECORD' and initialize record
in the FUNCTION body.
Postgres will cast the record var to t_my_type and allow return SETOF.
When FUNCTION accept argument with complex type, it is not possible.
PostgreSQL can't cast record to user defined type.
It is not possible use complex types with such domains in procedures.
In previous version - 8.2.1 it's worked normaly.
pgsql-bugs by date
|Next:||From: Thekkayil Joy Thomas||Date: 2007-06-01 05:47:23|
|Subject: BUG #3329: Issue with INSERT INTO for japanese katakana characters.|
|Previous:||From: Johndhihj||Date: 2007-05-31 12:41:11|
|Subject: BUG #3327: Hi great site great work thank you!|