On Fri, Sep 23, 2016 at 9:14 PM, Арсен Арутюнян wrote:
> would you like to help me with several questions:
> 1)are all functions atomic?
Yes, of course.
> 2)are they execute in a single query?
Same as executing n-number of SQL statements between BEGIN-COMMIT block.
Regards,
Amul
--
Sent v
On 09/23/2016 08:44 AM, Арсен Арутюнян wrote:
Hello all
i have the table
create table testpr(id serial,priority integer,unique(priority)
DEFERRABLE, primary key(id));
and procedure:
CREATE OR REPLACE FUNCTION JobPriorityChange(JobId bigint,NewPrior
integer) RETURNS void AS $$
DECLARE
PrevPrio
Hello all
i have the table
create table testpr(id serial,priority integer,unique(priority) DEFERRABLE,
primary key(id));
and procedure:
CREATE OR REPLACE FUNCTION JobPriorityChange(JobId bigint,NewPrior integer)
RETURNS void AS $$
DECLARE
PrevPrior integer;
BEGIN
PrevPrior := (select priority