Обсуждение: Issue 598

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

Issue 598

От
Dieter Van de Walle
Дата:
Hi,

New here.
Unless anybody objects I will try to fix issue 598<https://redmine.postgresql.org/issues/598>: truncate multiple tables
doesntwork , since it is annoying the hell out of me. 

Greetings,

Dieter Van de Walle



Re: Issue 598

От
Dave Page
Дата:
On Wed, Sep 4, 2013 at 10:03 AM, Dieter Van de Walle
<Dieter.VandeWalle@ebit.be> wrote:
> Hi,
>
> New here.
> Unless anybody objects I will try to fix issue 598<https://redmine.postgresql.org/issues/598>: truncate multiple
tablesdoesnt work , since it is annoying the hell out of me. 

Go for it - thanks!

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: Issue 598

От
Dieter Van de Walle
Дата:
I have attached a patch to the issue, see: https://redmine.postgresql.org/issues/598 .
Not sure about the preferred way to submit patches? I generated a patch file using 'git format-patch' .

It works, but I'd love some feedback on this...
I'm presuming the selected object will always be a collection when doing truncate, however not sure if this is true...
Would be nice to be enlightened on this ...

Best regards,

Dieter Van de Walle

On 2013-09-04 11:06, Dave Page wrote:

On Wed, Sep 4, 2013 at 10:03 AM, Dieter Van de Walle
<Dieter.VandeWalle@ebit.be><mailto:Dieter.VandeWalle@ebit.be> wrote:


Hi,

New here.
Unless anybody objects I will try to fix issue
598<https://redmine.postgresql.org/issues/598><https://redmine.postgresql.org/issues/598>:truncate multiple tables
doesntwork , since it is annoying the hell out of me.
 



Go for it - thanks!




Re: Issue 598

От
Dave Page
Дата:
Hi

On Wed, Sep 4, 2013 at 2:59 PM, Dieter Van de Walle
<Dieter.VandeWalle@ebit.be> wrote:
> I have attached a patch to the issue, see: https://redmine.postgresql.org/issues/598 .
> Not sure about the preferred way to submit patches? I generated a patch file using 'git format-patch' .

The format is fine. Why does the patch remove the check to stop you
dropping a system table though? That is unrelated and seems
ill-advised.

> It works, but I'd love some feedback on this...
> I'm presuming the selected object will always be a collection when doing truncate, however not sure if this is
true...
> Would be nice to be enlightened on this ...

No, I doubt it will always be a collection. Have a look at the code to
drop objects - Iirc, that does already handle multiple objects and
should get this right. However, if memory serves it does it in a
different way; you select multiple objects in the listview (NOT the
treeview) and drop them all at once. That gives more flexibility than
dropping the entire collection of course.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company