2008/5/5 <[EMAIL PROTECTED]>:
> There is situation where I check values and if they do not satisfy some
> condition I need to set default.
> What is the best way to do that?
don't do it :)
One advice for triggers - do only check of values and newer fix or
correct values. It's general advice. I l
There is situation where I check values and if they do not satisfy some
condition I need to set default.
What is the best way to do that?
- Original Message -
From: "Pavel Stehule" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc:
Sent: Monday, May 05, 2008 8:10 PM
Subject: Re: [BUGS] F
Hello
2008/5/5 <[EMAIL PROTECTED]>:
> So why I can do:
> insert into (id) values ( default )
> and can not do in my trigger:
> new.id = default
> Why?
it's not possible - because you cannot mix PL/pgSQL statement
(assignment) and SQL stetement.
syntax of assignment
:
variable := expression
exp
So why I can do:
insert into (id) values ( default )
and can not do in my trigger:
new.id = default
Why?
The following bug has been logged online:
Bug reference: 4145
Logged by: P.Senthil Kumar
Email address: [EMAIL PROTECTED]
PostgreSQL version: PostgreSQL 8.1.
Operating system: Linux
Description:org.postgresql.util.PSQLException: An I/O error occured
while sending to t