Re: DEALLOCATE IF EXISTS

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: DEALLOCATE IF EXISTS
Дата
Msg-id 50BF01DF.5060105@vmware.com
обсуждение исходный текст
Ответ на Re: DEALLOCATE IF EXISTS  (Vik Reykja <vikreykja@gmail.com>)
Ответы Re: DEALLOCATE IF EXISTS
Список pgsql-hackers
On 30.11.2012 12:05, Vik Reykja wrote:
> On Tue, Nov 27, 2012 at 3:15 PM, Heikki Linnakangas<hlinnakangas@vmware.com
>> wrote:
>
>> I fail to see the point of DEALLOCATE IF EXISTS. Do you have real use case
>> for this, or was this just a case of adding IF EXISTS to all commands for
>> the sake of completeness?
>>
>> Usually the client knows what statements have been prepared, but perhaps
>> you want to make sure everything is deallocated in some error handling case
>> or similar. But in that case, you might as well just issue a regular
>> DEALLOCATE and ignore errors. Or even more likely, you'll want to use
>> DEALLOCATE ALL.
>
> Hmm.  The test case I had for it, which was very annoying in an "I want to
> be lazy" sort of way, I am unable to reproduce now.  So I guess this
> becomes a "make it like the others" and the community can decide whether
> that's desirable.
>
> In my personal case, which again I can't reproduce because it's been a
> while since I've done it, DEALLOCATE ALL would have worked.  I was
> basically preparing a query to work on it in the same conditions that it
> would be executed in a function, and I was only working on one of these at
> a time so ALL would have been fine.

Ok. Being the lazy person that I am, I'm going to just mark this as 
rejected then. There is no consensus that we should decorate every DDL 
command with "IF EXISTS", and even if we did, it's not clear that it 
should include DEALLOCATE. But thanks for the effort anyway!

- Heikki



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

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: WIP: store additional info in GIN index
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: the number of pending entries in GIN index with FASTUPDATE=on