Re: Better name/syntax for "online" index creation

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Better name/syntax for "online" index creation
Дата
Msg-id 877j20qvy8.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: Better name/syntax for "online" index creation  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:

> Greg Stark wrote:
> > One thing to think about, what will the command to execute stored
> > procedures look like? Those will also need to be called from outside
> > a transaction.
> 
> Huh?  Only if you invent your own stored-procedure theory or have a 
> hitherto unknown interpretation of the SQL standard.

Well I haven't read that section of the standard. But from discussions on the
mailing list the key feature distinguishing "stored procedures" from
"functions" will be whether they live inside or outside transactions.

Functions are called within WHERE clauses and elsewhere and cannot start or
end transactions since that would be nonsensical. 

Stored procedures are basically shell scripts running in the database engine
and can do pretty much anything the user can do from a psql prompt including
things like starting and end transactions and mutating state variables.

I suppose there's nothing stopping them from being called with a transaction
already opened, closing it and starting a new one but it seems like that would
be very confusing for users. Essentially that's why CLUSTER and CREATE INDEX
... ONLINE make sure there isn't a user started transaction already. Not
because it wouldn't work but because the interface would just be surprising
and confusing for users. I guess that never stopped the SQL standard committee
before, why should it start now? p

-- 
greg



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "jkzhao"
Дата:
Сообщение: default lower case of identifier
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: [PATCHES] patch implementing the multi-argument aggregates (SOC project)