> > SELECT ... FOR UPDATE? > http://www.postgresql.org/docs/current/interactive/sql-select.html > > "FOR UPDATE causes the rows retrieved by the SELECT statement to be > locked as though for update. This prevents them from being modified or > deleted by other transactions until the current transaction ends. That > is, other transactions that attempt UPDATE, DELETE, or SELECT FOR > UPDATE of these rows will be blocked until the current transaction > ends. Also, if an UPDATE, DELETE, or SELECT FOR UPDATE from another > transaction has already locked a selected row or rows, SELECT FOR > UPDATE will wait for the other transaction to complete, and will then > lock and return the updated row (or no row, if the row was deleted)." > > Leia também sobre transações.
Pela regra do negocio você só deve atualizar o registro depois que a atendente confirmar, pois as vezes vc pode selecionar o registro e ninguém conseguir falar nesse numero."entre outras" -- Rodrigo Marins http://pgcon.postgresql.org.br/ http://portaldodesenvolvedor.com.br/ (11) 8747-7442
_______________________________________________ pgbr-geral mailing list [email protected] https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
