sql - @@Fetch_status in postgreSQL -


i'm transfering database ms sql server postgresql , have problem trigger:

create trigger added_clients on client insert begin declare cursor_inserted cursor select name, surname inserted; open cursor_inserted declare @name varchar(15), @surname varchar(20) fetch next cursor_inserted @name, @surname while @@fetch_status = 0 begin print 'added: '+@name+' '+ @surname fetch next cursor_inserted @name, @surname end close cursor_inserted deallocate cursor_inserted end go 

what equivalent of @@fetch_status in postgresql?

here cursor documentation postgresql

http://www.postgresql.org/docs/current/static/plpgsql-cursors.html

looping through cursor:

[ <<label>> ] recordvar in bound_cursorvar [ ( [ argument_name := ] argument_value [, ...] ) ] loop     statements end loop [ label ]; 

Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -