Hello please assist
How i can handle nowait EXCEPTION from c function;
select for update nowait
SPI_execute_plan(UpdateStat, Values, NULL, false, 1);
Arsen
--
Арсен Арутюнян
Thank you
next question - how i can call pg_notify or NOTIFY query from c function
Arsen
>Пятница, 23 июня 2017, 0:33 +03:00 от Tom Lane :
>
>=?UTF-8?B?0JDRgNGB0LXQvSDQkNGA0YPRgtGO0L3Rj9C9?= < aru...@bk.ru > writes:
>> Datum Values[2];
>
>> Values[0]-is integer type
>> but Values[1] is string
// Data inserted
} after selection inserted data looks like
"Command":227,"Status":2,"JobId":4}
first { simboll is lost
Arsen
--
Арсен Арутюнян
Hello
I can't:convert char* to Datum
Datum Values[2];
Values[0]-is integer type
but Values[1] is string type so
Values[0] = SET_4_BYTES(227);
please assist how can i convert som char* string to Datum
Values[1] = CONVERT_STRING_TO DATUM(char *); etc
best
--
Арсен Арутюнян
Hello.
I have a few questions:
1) JobStatusTest1 function has only one request and JobStatusTest2 function
has as many as six requests.
Why function JobStatusTest2 is faster?
JobStatusTest1 : 981.596 ms
JobStatusTest2 : 849.133 ms
2) Two functions JobStatusTest3 and JobStatusTest4 perform the
Hello.
I have a few questions:
1) JobStatusTest1 function has only one request and JobStatusTest2 function
has as many as six requests.
Why function JobStatusTest2 is faster?
JobStatusTest1 : 981.596 ms
JobStatusTest2 : 849.133 ms
2) Two functions JobStatusTest3 and JobStatusTest4 perform the
Hi, everyone!
I have a table:
create table testpr(id serial,priority integer,unique(priority) DEFERRABLE,
primary key(id));
and a trigger which, when added to this table, automatically sets priority as
the maximum value +1
CREATE OR REPLACE FUNCTION PriorityCheck() RETURNS trigger AS $$
BEGIN
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