Обсуждение: create user and transactions

Поиск
Список
Период
Сортировка

create user and transactions

От
Thomas Lockhart
Дата:
The ODBC driver has trouble with 7.0.x for some apps. 7.0.x has some
additional "error checking" which rejects some commands appearing inside
of transactions. Can we consider relaxing this, particularly since we
are considering making some of these "rejecting conditions"
transaction-friendly in a future release? Dumping work into ODBC and
other drivers to work around this is a diversion from other projects,
and I'm not sure we'll have much to show for it in the end.

btw, this is a continuation of the discussion regarding protecting users
from themselves vs handing them an ever-sharper tool. Usually I'll vote
for working on sharpening the tool rather than dulling it to protect a
naive user. I'll avoid using the analogy to the evolution of barbecue
lighter fluid, which in recent years is no longer very risky, but also
has trouble lighting barbecues :/
               - Thomas


Re: create user and transactions

От
Tom Lane
Дата:
Thomas Lockhart <lockhart@alumni.caltech.edu> writes:
> The ODBC driver has trouble with 7.0.x for some apps. 7.0.x has some
> additional "error checking" which rejects some commands appearing inside
> of transactions. Can we consider relaxing this, particularly since we
> are considering making some of these "rejecting conditions"
> transaction-friendly in a future release?

I thought all along that having CREATE USER et al refuse to run
inside a transaction was a bad idea.  Peter?
        regards, tom lane


Re: create user and transactions

От
Peter Eisentraut
Дата:
Thomas Lockhart writes:

> The ODBC driver has trouble with 7.0.x for some apps. 7.0.x has some
> additional "error checking" which rejects some commands appearing inside
> of transactions. Can we consider relaxing this, particularly since we
> are considering making some of these "rejecting conditions"
> transaction-friendly in a future release?

I can supply a patch for the create/drop user case since there's not much
to be lost there. But what about databases? AFAIK there are no plans on
making their creation and removal transaction friendly at all, so we'd be
in "NOTICE: don't do that" mode for a very long time.


-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



Re: create user and transactions

От
Tom Lane
Дата:
Peter Eisentraut <peter_e@gmx.net> writes:
> I can supply a patch for the create/drop user case since there's not much
> to be lost there. But what about databases? AFAIK there are no plans on
> making their creation and removal transaction friendly at all, so we'd be
> in "NOTICE: don't do that" mode for a very long time.

Agreed, we have no plans to support rollbackable CREATE or DROP
DATABASE, so I don't have an objection to erroring out on them.

But the user & group manipulation commands need to be less picky...
        regards, tom lane