Thread: Views!

Views!

From
Hrishikesh Deshmukh
Date:
Hi All,

I have 254 tables,  i want to "subset" it in 237 and 17 tables?!
Is creating views the answer?/ Is there a better way to "subset" them?

Thanks,
Hrishi

Re: Views!

From
Sean Davis
Date:
Have a look at schemas:

http://www.postgresql.org/docs/current/static/ddl-schemas.html

Sean

On Mar 29, 2005, at 8:27 AM, Hrishikesh Deshmukh wrote:

> Hi All,
>
> I have 254 tables,  i want to "subset" it in 237 and 17 tables?!
> Is creating views the answer?/ Is there a better way to "subset" them?
>
> Thanks,
> Hrishi
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to
> majordomo@postgresql.org


Re: Views!

From
Hrishikesh Deshmukh
Date:
Hi,

I have go through the docs; what you are suggesting is that take 237
tables and add them into a schema! Could you please please give a code
snippet?

Thanks,
Hrishi


On Tue, 29 Mar 2005 09:01:24 -0500, Sean Davis <sdavis2@mail.nih.gov> wrote:
> Have a look at schemas:
>
> http://www.postgresql.org/docs/current/static/ddl-schemas.html
>
> Sean
>
> On Mar 29, 2005, at 8:27 AM, Hrishikesh Deshmukh wrote:
>
> > Hi All,
> >
> > I have 254 tables,  i want to "subset" it in 237 and 17 tables?!
> > Is creating views the answer?/ Is there a better way to "subset" them?
> >
> > Thanks,
> > Hrishi
> >
> > ---------------------------(end of
> > broadcast)---------------------------
> > TIP 1: subscribe and unsubscribe commands go to
> > majordomo@postgresql.org
>
>

Re: Views!

From
Ragnar Hafstað
Date:
On Tue, 2005-03-29 at 11:48 -0500, Hrishikesh Deshmukh wrote:

[rearranged]

> On Tue, 29 Mar 2005 09:01:24 -0500, Sean Davis <sdavis2@mail.nih.gov> wrote:
> > On Mar 29, 2005, at 8:27 AM, Hrishikesh Deshmukh wrote:
> >
> > >
> > > I have 254 tables,  i want to "subset" it in 237 and 17 tables?!
> > > Is creating views the answer?/ Is there a better way to "subset" them?
> >
> > Have a look at schemas:
>
> I have go through the docs; what you are suggesting is that take 237
> tables and add them into a schema!

maybe less work to move the other 17 tables.

gnari



Re: Views!

From
Hrishikesh Deshmukh
Date:
Could you give me an example as to how to do it in SQL?
CREATE TABLE myschema.mytable (
 table1, table2,table3......table17
);

Also can i do querying against a schema/view?

Thanks,
Hrishi


On Tue, 29 Mar 2005 17:16:33 +0000, Ragnar Hafstað <gnari@simnet.is> wrote:
> On Tue, 2005-03-29 at 11:48 -0500, Hrishikesh Deshmukh wrote:
>
> [rearranged]
>
> > On Tue, 29 Mar 2005 09:01:24 -0500, Sean Davis <sdavis2@mail.nih.gov> wrote:
> > > On Mar 29, 2005, at 8:27 AM, Hrishikesh Deshmukh wrote:
> > >
> > > >
> > > > I have 254 tables,  i want to "subset" it in 237 and 17 tables?!
> > > > Is creating views the answer?/ Is there a better way to "subset" them?
> > >
> > > Have a look at schemas:
> >
> > I have go through the docs; what you are suggesting is that take 237
> > tables and add them into a schema!
>
> maybe less work to move the other 17 tables.
>
> gnari
>
>