How can I know if a row is locked by another transaction.
I have in a transaction like that:
BEGIN;
SELECT * FROM compels.teste WHERE id = '1' FOR UPDATE;
PS1: where id is the primary key.
PS2: The COMMIT command is done after a long time.
In this case the row with the primary-key equals to '1'
Hi!
I need Postgresql somehow does this for me:
- if an user query a select on a table, the rows of the table in the result of
this select can not be updated or deleted by another user until this one
update, delete or discard the changes on those rows.
I've found something about the LOCK command
Hi!
I need to query a select that returns all the fields of an specific primary
key, but I don't have the single column's name that is constrained as primary
key.
How can I do that?
Something like:
SELECT * FROM myTable WHERE myTable.pkey = 'foo';
Thanks
Carlos Henrique Iazzetti Santos
Compe
All my columns have the same data type: text.
So it's much easier.
Carlos Henrique Iazzetti Santos
Compels Informática
Santa Rita do Sapucaí - MG
www.compels.net
- Mensagem original
De: Richard Huxton
Para: Carlos Santos <[EMAIL PROTECTED]>
Cc: Lista PostgreSQL SQ
Hi!
I need to make a query like this:
SELECT id FROM myTable WHERE column-number = 'value';
(PS: The id column is the primary key of myTable).
That is a select using column number in the WHERE clause what don't exists in
SQL.
I need this because there's a situation in my program where I don't