Thread: locking a dropped table

locking a dropped table

From
"Thomas F. O'Connell"
Date:
is there any way to preserve a lock on a table that gets dropped?

i have a situation where it would be nice to have a select wait on a
lock on a table that gets dropped but almost immediately recreated, but,
at the moment, the select generates an error as soon as the table is
dropped if the two actions happen close enough in time.

-tfo


Re: locking a dropped table

From
Tom Lane
Date:
"Thomas F. O'Connell" <tfo@monsterlabs.com> writes:
> is there any way to preserve a lock on a table that gets dropped?
> i have a situation where it would be nice to have a select wait on a
> lock on a table that gets dropped but almost immediately recreated, but,
> at the moment, the select generates an error as soon as the table is
> dropped if the two actions happen close enough in time.

When you drop and recreate a table, you do not have the same table
anymore.  You have a completely different object that happens to have
the same name as the previous table.  So there is no possibility of
having a lock that covers both.

Perhaps rather than dropping the table, you should consider just
removing all its entries.

            regards, tom lane

help with programming

From
Chris Hayner
Date:
hello all,
as (I think) shown on the libpq - C library page of the documentation, I
attempetd to connedt over ssl to a correctly compiled 7.1 database. Here
is the connection portion of my code:


PGconn          *conn;

...

        /* make a connection to the database */
        conn = PQconnectdb( "host=shelob.temple.edu dbname=ldap_backend user=usr requiressl=1");

...


when run, the program dies with the following :

ERROR: Unknown conninfo option 'requiressl'

any help in this matter would be greatly appreciated.

thanks in advance,
--chris hayner