Re: views and categorized tables

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Zery <zery(dot)sp(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: views and categorized tables
Date: 2011-02-26 15:18:42
Message-ID: 4D6919D2.3040906@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 26/02/2011 15:04, Zery wrote:
> Hi,
>
> I'm new in database world, but I know postgres for a long time ago. Now
> I'm trying to focusing on developing a database using postgresql and
> postgis extension. I have several question that needs help from all of you.
>
> 1. I understand about a view, the lack for me is I cannot edit a view
> table, is it possible to create a view on top of a table, so I can view
> the table by joining to another table but I can edit the table also?

You can't edit views in PostgreSQL - they are read-only. You can get a
similar effect using rules, but I gather they can be difficult to get
right - I've never tried it myself.

What exactly are you trying to do? From the above, it sounds a bit as if
you might be restricting access to a table; if that's the case, you can
do it better using permissions. Views, in my experience, are more often
used for simplifying complex queries (among other things). If you tell
us more about what you want to do, it will help people to come up with
suggestions.

> 2. Can i categorized tables by its category? so when I open the database
> using my database client I will see "a folder inside a folder" like
> view, not all the tables listed in my database client, but the category
> will be listed, and when I open the category then I see the tables.

No, there's no concept of a table category in PostgreSQL. Perhaps
schemas may do what you want? - They effectively give you databases
within databases.... though they group together many other types of
objects - views, functions, types, etc etc - not just tables. Again,
what exactly are you trying to do?

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2011-02-26 15:21:58 Re: Please help -- Postgres stopped responding ....
Previous Message David Johnston 2011-02-26 15:14:51 Re: views and categorized tables