[MonetDB-users] inserting into default schema?

m h sesquile at gmail.com
Wed Dec 5 09:11:57 CET 2007


On Dec 5, 2007 1:05 AM, Fabian Groffen <Fabian.Groffen at cwi.nl> wrote:
>
> On 04-12-2007 23:54:24 -0700, m h wrote:
> > On Nov 30, 2007 3:01 PM, Niels Nes <Niels.Nes at cwi.nl> wrote:
> > > On Fri, Nov 30, 2007 at 02:52:34PM -0700, m h wrote:
> > > > If I create a table, by default it goes into the "tmp" schema.
> > > The "tmp" schema isn't intended for such usage. Its to store
> > > 'temporary' tables, ie those created using.
> > >
> > > create temp table x
> > >
> > > With a normal login to MonetDB/SQL using the monetdb user,
> > > you will end up in the sys schema, ie new tables are created inside
> > > this one.
> > >
> > > Anyway if you don't want that, then you should create your own
> > > schema and user(s) etc.
> >
> > Does the JDBC driver store newly created tables in the tmp schema?
> > sys?  Some other default?
>
> The JDBC driver just opens a normal SQL session, so it stores tables
> without explicit given schema in the default schema, which can be set
> using:
>         ALTER USER "myuser" SET SCHEMA "myschema"
>
> Alternatively, within a session you can use
>         SET SCHEMA "myschema"
>
> e.g.:
>
> monetdb-> create schema "myschema";
> Operation successful
>
> monetdb-> set schema "myschema";
>
> monetdb-> create table a (id int);
> Operation successful
>
> monetdb-> \d
> TABLE   myschema.a
>

Sorry, I'm a schema newbie.  Can schema be nested then?  If I open a
default one (in SQLAlchemy) and then the user decides they want
another one, can one just "push" a new schema and "pop" them?




More information about the users-list mailing list