trigger function with arguments from a sql command - Mailing list pgsql-novice

From Luis Silva
Subject trigger function with arguments from a sql command
Date
Msg-id BAY18-DAV89A1EC8002779BCE6B68DB5430@phx.gbl
Whole thread Raw
Responses Re: trigger function with arguments from a sql command  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List pgsql-novice
hi there, i'm having a big problem. I have this table
 
 
CREATE TABLE test {
 
    id int8 NOT NULL,
    asname varchar(80) NOT NULL,
    priority int2 NOT NULL,
    serviceid,
    ...
 
    CONSTRAIN PRIMARY KEY (id),
    CONSTRAIN FOREIGN KEY (serviceid) REFERENCES service (id) MATCH FULL
}
 
and i need to make a trigger function that accept arguments insert in a INSERT INTO. The priority value must be unique for the same serviceid but it can be the same for different serviceid. how can i do that, pass the arguments of a command? tks in advance
 
 

pgsql-novice by date:

Previous
From: Andreas Seltenreich
Date:
Subject: Re: How to see detailed plan of a funciton
Next
From: "A. Kretschmer"
Date:
Subject: Re: trigger function with arguments from a sql command