Skip site navigation (1) Skip section navigation (2)

Re: Parsing the result of a function to a view in an INSERT statement.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Donald Fraser" <demolish(at)cwgsy(dot)net>
Cc: "[BUGS]" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Parsing the result of a function to a view in an INSERT statement.
Date: 2003-04-24 12:58:36
Message-ID: 12849.1051189116@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"Donald Fraser" <demolish(at)cwgsy(dot)net> writes:
> I have observed that using a function to provide a default value on a colum=
> n of a view or attempting to parse the result of a function to a view in an=
>  insert or update statement produces undesirable results.

Rules are macros and as such you have to think about multiple
evaluations of their arguments.  You would probably be better off using
triggers for what you seem to be trying to accomplish.

			regards, tom lane


In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2003-04-24 13:12:40
Subject: Re: PostgreSQL 7.3 Installation Error
Previous:From: Donald FraserDate: 2003-04-24 11:05:38
Subject: Parsing the result of a function to a view in an INSERT statement.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group