Re: BUG #4402: Column expansion: date comes wthout a cast - Mailing list pgsql-bugs

From Euler Taveira de Oliveira
Subject Re: BUG #4402: Column expansion: date comes wthout a cast
Date
Msg-id 48C1E348.3030109@timbira.com
Whole thread Raw
In response to BUG #4402: Column expansion: date comes wthout a cast  ("Joachim Unger" <jo.unger@arcor.de>)
List pgsql-bugs
Joachim Unger escreveu:
> The column expansion lists date types without a date cast.
>
And all of the text types too.

> 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;
> [...]
>
Why aren't you expanding it yourself? Currently, PostgreSQL doesn't have
a function that does the quoting-if-needed automagically.


--
  Euler Taveira de Oliveira
  http://www.timbira.com/

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: BUG #4377: casting result of timeofday() to timestamp fails in some timezones
Next
From: "Ross Toole"
Date:
Subject: BUG #4404: Installation Appears to work service fails