Thread: Schema and tablespace

Schema and tablespace

From
Guillaume Lelarge
Date:
Hi,

One feature I want to add to next pgAdmin release is the change of
schema for any objects (just as we can change the tablespace or owner of
an object). I have some ideas on how to do this but I'm wondering if
there was something that make this impossible to do. (Well, I know,
strange question, but I don't why we can change tablespace but not
schema... apart from the treeview changes it applies).

Another feature I want deals with tablespace. When I select a
tablespace, I would like to see all objects that belong to this
tablespace. The way to handle this would be to add children to the
tablespace nodes in the treeview. The problem I see is that every new
object will need at least two nodes on the treeview (one in the schema
part and one in the tablespace part). Do you see other problems with this ?

Thanks.


--
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com

Re: Schema and tablespace

From
Magnus Hagander
Date:
Guillaume Lelarge wrote:
> Hi,
>
> One feature I want to add to next pgAdmin release is the change of
> schema for any objects (just as we can change the tablespace or owner of
> an object). I have some ideas on how to do this but I'm wondering if
> there was something that make this impossible to do. (Well, I know,
> strange question, but I don't why we can change tablespace but not
> schema... apart from the treeview changes it applies).

Shouldn't be. The schema is just something at the logical level, so you
should be able to change it around at will.


> Another feature I want deals with tablespace. When I select a
> tablespace, I would like to see all objects that belong to this
> tablespace. The way to handle this would be to add children to the
> tablespace nodes in the treeview. The problem I see is that every new
> object will need at least two nodes on the treeview (one in the schema
> part and one in the tablespace part). Do you see other problems with this ?

It would be neat to have. But maybe that's one step unnecessary - it
might be enough to just have a listview that has a column saying what
type it is, and another one saying the name? And the size probably,
since that's most likely why you're looking there?

//Magnus

Re: Schema and tablespace

From
Guillaume Lelarge
Date:
Magnus Hagander wrote:
> Guillaume Lelarge wrote:
> [...]
>> Another feature I want deals with tablespace. When I select a
>> tablespace, I would like to see all objects that belong to this
>> tablespace. The way to handle this would be to add children to the
>> tablespace nodes in the treeview. The problem I see is that every new
>> object will need at least two nodes on the treeview (one in the schema
>> part and one in the tablespace part). Do you see other problems with this ?
>
> It would be neat to have. But maybe that's one step unnecessary - it
> might be enough to just have a listview that has a column saying what
> type it is, and another one saying the name? And the size probably,
> since that's most likely why you're looking there?
>

I've thought about this too but I didn't find a place where I can put
this new listview : another tab near the properties one ? this does not
feel consistent to me. That's why I still prefer to continue the
treeview... but if you have a better idea, I'm eager to know it :)


--
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com

Re: Schema and tablespace

From
"Dave Page"
Date:

> ------- Original Message -------
> From: Guillaume Lelarge <guillaume@lelarge.info>
> To: Magnus Hagander <magnus@hagander.net>
> Sent: 17/12/07, 22:23:50
> Subject: Re: [pgadmin-hackers] Schema and tablespace
>
> I've thought about this too but I didn't find a place where I can put
> this new listview : another tab near the properties one ? this does not
> feel consistent to me. That's why I still prefer to continue the
> treeview... but if you have a better idea, I'm eager to know it :)

Don't we get this for free from the dependents tab?

For the record, I don't want to list objects under tablespaces on the treeview - that would cause even more
dependency/refreshissues than we have now. 

/D

Re: Schema and tablespace

From
Guillaume Lelarge
Date:
Dave Page wrote:
>
>> ------- Original Message -------
>> From: Guillaume Lelarge <guillaume@lelarge.info>
>> To: Magnus Hagander <magnus@hagander.net>
>> Sent: 17/12/07, 22:23:50
>> Subject: Re: [pgadmin-hackers] Schema and tablespace
>>
>> I've thought about this too but I didn't find a place where I can put
>> this new listview : another tab near the properties one ? this does not
>> feel consistent to me. That's why I still prefer to continue the
>> treeview... but if you have a better idea, I'm eager to know it :)
>
> Don't we get this for free from the dependents tab?
>
> For the record, I don't want to list objects under tablespaces on the treeview - that would cause even more
dependency/refreshissues than we have now. 
>

That was one of the issue I had : refresh is a bit of a nightmare. I
think I'll try the listview in a new tab. But first, I'll get a look at
the dependents tab but I'm not sure I will find a size column in there.


--
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com

Re: Schema and tablespace

From
Dave Page
Date:
Guillaume Lelarge wrote:
> Dave Page wrote:
>>> ------- Original Message -------
>>> From: Guillaume Lelarge <guillaume@lelarge.info>
>>> To: Magnus Hagander <magnus@hagander.net>
>>> Sent: 17/12/07, 22:23:50
>>> Subject: Re: [pgadmin-hackers] Schema and tablespace
>>>
>>> I've thought about this too but I didn't find a place where I can put
>>> this new listview : another tab near the properties one ? this does not
>>> feel consistent to me. That's why I still prefer to continue the
>>> treeview... but if you have a better idea, I'm eager to know it :)
>> Don't we get this for free from the dependents tab?
>>
>> For the record, I don't want to list objects under tablespaces on the treeview - that would cause even more
dependency/refreshissues than we have now. 
>>
>
> That was one of the issue I had : refresh is a bit of a nightmare. I
> think I'll try the listview in a new tab. But first, I'll get a look at
> the dependents tab but I'm not sure I will find a size column in there.
>
>

I'm not entirely sure we're on the same page. All we need to do it see
what's in a tablespace right? We should see that already because the
Dependents tab will list all object that are dependent upon the
tablespace in some way. We get the size and other details from the node
in the treeview for each object - that's all data that I don't want to
duplicate.

/D

Re: Schema and tablespace

From
Guillaume Lelarge
Date:
Dave Page wrote:
> Guillaume Lelarge wrote:
>>>[...]
>> That was one of the issue I had : refresh is a bit of a nightmare. I
>> think I'll try the listview in a new tab. But first, I'll get a look at
>> the dependents tab but I'm not sure I will find a size column in there.
>>
>
> I'm not entirely sure we're on the same page. All we need to do it see
> what's in a tablespace right?

Not really. As Magnus said, we need to see what's in the tablespace and
the size of each object.

> We should see that already because the
> Dependents tab will list all object that are dependent upon the
> tablespace in some way. We get the size and other details from the node
> in the treeview for each object - that's all data that I don't want to
> duplicate.

I'm not interested in "the other details" but I think a list of objects
with their size is important. Usually, one use a tablespace when one
needs more disk space. With this, you can see quickly the disk space
used in the tablespace.


--
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com

Re: Schema and tablespace

From
Dave Page
Date:
Guillaume Lelarge wrote:
> Dave Page wrote:
>> Guillaume Lelarge wrote:
>>>> [...]
>>> That was one of the issue I had : refresh is a bit of a nightmare. I
>>> think I'll try the listview in a new tab. But first, I'll get a look at
>>> the dependents tab but I'm not sure I will find a size column in there.
>>>
>> I'm not entirely sure we're on the same page. All we need to do it see
>> what's in a tablespace right?
>
> Not really. As Magnus said, we need to see what's in the tablespace and
> the size of each object.

Hmm - I'm not too keen on the idea of adding a special tab for this one
purpose. How about handling this in a similar way to how we display the
EDB system catalogs, in which we have a special pseudo-object called a
'catalog object' which gives a generic representation of a view or
table? We would have a collection of 'tablespace objects' under the
tablespace, with limited properties of name, schema, oid, size, comment
and anything else thats suitably generic that I've forgotten.

That would also allow the reporting engine to be used easily...

/D

Re: Schema and tablespace

From
Guillaume Lelarge
Date:
Dave Page wrote:
> Guillaume Lelarge wrote:
>> Dave Page wrote:
>>> Guillaume Lelarge wrote:
>>>>> [...]
>>>> That was one of the issue I had : refresh is a bit of a nightmare. I
>>>> think I'll try the listview in a new tab. But first, I'll get a look at
>>>> the dependents tab but I'm not sure I will find a size column in there.
>>>>
>>> I'm not entirely sure we're on the same page. All we need to do it see
>>> what's in a tablespace right?
>> Not really. As Magnus said, we need to see what's in the tablespace and
>> the size of each object.
>
> Hmm - I'm not too keen on the idea of adding a special tab for this one
> purpose. How about handling this in a similar way to how we display the
> EDB system catalogs, in which we have a special pseudo-object called a
> 'catalog object' which gives a generic representation of a view or
> table? We would have a collection of 'tablespace objects' under the
> tablespace, with limited properties of name, schema, oid, size, comment
> and anything else thats suitably generic that I've forgotten.
>

Seems to be good for me. I'll try to find some time to look at this.

> That would also allow the reporting engine to be used easily...
>


--
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com