"Jenny -" <nat_lazy@hotmail.com> writes:
> so even though the application locks a row in a table, table-level locks are
> automatically taken by postgesql ? why is that?
So that the table doesn't disappear while you're trying to scan it. (Or
afterwards --- a row-level lock wouldn't be noticed by DROP TABLE.)
Note that AccessShareLock is a pretty weak kind of lock, and holding it
does not prevent most other operations.
regards, tom lane