From: | "Joachim Unger" <jo(dot)unger(at)arcor(dot)de> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #4402: Column expansion: date comes wthout a cast |
Date: | 2008-09-05 05:37:39 |
Message-ID: | 200809050537.m855bdSv058698@wwwmaster.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 4402
Logged by: Joachim Unger
Email address: jo(dot)unger(at)arcor(dot)de
PostgreSQL version: 8.3
Operating system: Windwos XP Professional 32 Bit
Description: Column expansion: date comes wthout a cast
Details:
The column expansion lists date types without a date cast.
Here is an example where I'm using NEW inside a trigger:
[...]
ins_sql := 'INSERT INTO ' || quote_ident(new_child_table) || '('
||col_names(new_child_table) || ') VALUES ' || NEW;
RAISE NOTICE 'INSERT: %',ins_sql;
EXECUTE ins_sql;
[...]
Execution of the generated SQL throws an error:
ERROR: column "adate" is of type date but expression is of type integer
LINE 1: INSERT INTO table_2008_1(id,adate) VALUES (1,2008-01-30)
HINT: You will need to rewrite or cast the expression.
That hint describes exactly what is missing:(1,DATE '2008-01-30')
From | Date | Subject | |
---|---|---|---|
Next Message | Rainer Glueck | 2008-09-05 08:22:54 | Re: BUG #4398: Backslashes get escaped despite of backslash_quote=off |
Previous Message | Tom Lane | 2008-09-05 00:33:36 | Re: BUG #4401: concurrent updates to a table blocks one update indefinitely |