Andres Freund writes:
> Is there a special reason for not using the normal function calling
> mechanisms? It looks to me as it was just done to have an easy way to store
> it
> in pg_trigger.tgargs.
Well, this is all very historical, dating from Berkeley days AFAIK.
If we had it to do over, I
On Wednesday, May 11, 2011 07:25:58 PM Tom Lane wrote:
> Andres Freund writes:
> >> The grammar accepts only a very limited amount of parameters there:
> > Err
> >
> > TriggerFuncArg:
> > Iconst
> >
> > {
> >
> > ch
Andres Freund writes:
>> The grammar accepts only a very limited amount of parameters there:
> Err
> TriggerFuncArg:
> Iconst
> {
> char buf[64];
> snprintf(buf, sizeof(buf), "%d", $1);
> $$ = makeString(p
On 11 May 2011 12:06, Andres Freund wrote:
>
> Why do you wan't to use a boolean directly if you can't use it as the type
> itself anyway?
>
>
Yep, and this is a really good point :)
I wanted to have consistent api, so use true when I have a boolean value.
I will use 'true' and add some info on t
On Wednesday, May 11, 2011 11:50:35 AM Szymon Guz wrote:
> On 11 May 2011 11:29, Andres Freund wrote:
> > On Wednesday, May 11, 2011 11:21:34 AM Andres Freund wrote:
> > > On Wednesday, May 11, 2011 11:01:56 AM Andreas Joseph Krogh wrote:
> > > > På onsdag 11. mai 2011 kl 10:56:19 skrev :
> > > >
På onsdag 11. mai 2011 kl 11:30:51 skrev Szymon Guz :
On 11 May 2011 11:01, Andreas Joseph Krogh wrote:
På onsdag 11. mai 2011 kl 10:56:19 skrev :
> > Hi,
> > I was trying to create a trigger with parameters. I've found a potential
>
On 11 May 2011 11:01, Andreas Joseph Krogh wrote:
> På onsdag 11. mai 2011 kl 10:56:19 skrev :
> > > Hi,
> > > I was trying to create a trigger with parameters. I've found a
> potential
> > > bug
> > > when the param is boolean.
> > >
> > > Here is code replicating the bug:
> > >
> > > CREATE TAB
On Wednesday, May 11, 2011 11:21:34 AM Andres Freund wrote:
> On Wednesday, May 11, 2011 11:01:56 AM Andreas Joseph Krogh wrote:
> > På onsdag 11. mai 2011 kl 10:56:19 skrev :
> > > > CREATE TRIGGER trig_x_bool BEFORE INSERT ON x FOR EACH ROW EXECUTE
> > > > PROCEDURE
> > > > trigger_x(true);
> > >
On Wednesday, May 11, 2011 11:01:56 AM Andreas Joseph Krogh wrote:
> På onsdag 11. mai 2011 kl 10:56:19 skrev :
> > > CREATE TRIGGER trig_x_bool BEFORE INSERT ON x FOR EACH ROW EXECUTE
> > > PROCEDURE
> > > trigger_x(true);
> > The docs clearly state what the valid values are and the literal 'true'
På onsdag 11. mai 2011 kl 10:56:19 skrev :
> > Hi,
> > I was trying to create a trigger with parameters. I've found a potential
> > bug
> > when the param is boolean.
> >
> > Here is code replicating the bug:
> >
> > CREATE TABLE x(x TEXT);
> >
> > CREATE OR REPLACE FUNCTION trigger_x() RETURNS TRI
On 11 May 2011 10:56, wrote:
> > Hi,
> > I was trying to create a trigger with parameters. I've found a potential
> > bug
> > when the param is boolean.
> >
> > Here is code replicating the bug:
> >
> > CREATE TABLE x(x TEXT);
> >
> > CREATE OR REPLACE FUNCTION trigger_x() RETURNS TRIGGER AS $$
>
> Hi,
> I was trying to create a trigger with parameters. I've found a potential
> bug
> when the param is boolean.
>
> Here is code replicating the bug:
>
> CREATE TABLE x(x TEXT);
>
> CREATE OR REPLACE FUNCTION trigger_x() RETURNS TRIGGER AS $$
> BEGIN
> RETURN NEW;
> END; $$ LANGUAGE PLP
Hi,
I was trying to create a trigger with parameters. I've found a potential bug
when the param is boolean.
Here is code replicating the bug:
CREATE TABLE x(x TEXT);
CREATE OR REPLACE FUNCTION trigger_x() RETURNS TRIGGER AS $$
BEGIN
RETURN NEW;
END; $$ LANGUAGE PLPGSQL;
CREATE TRIGGER t
13 matches
Mail list logo