[MonetDB-users] inserting into default schema?
If I create a table, by default it goes into the "tmp" schema. But when I try to create a "users" table, it complains, since there is one in the "sys" schema. Why doesn't it create one in the "tmp" schema? ie: CREATE TABLE users (fcol FLOAT(25)); !CREATE TABLE: name 'users' already in use Just wondering about the resolution order. thanks -matt
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. Niels
But when I try to create a "users" table, it complains, since there is one in the "sys" schema. Why doesn't it create one in the "tmp" schema?
ie: CREATE TABLE users (fcol FLOAT(25)); !CREATE TABLE: name 'users' already in use
Just wondering about the resolution order.
thanks
-matt
------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
-- Niels Nes, Centre for Mathematics and Computer Science (CWI) Kruislaan 413, 1098 SJ Amsterdam, The Netherlands room C0.02, phone ++31 20 592-4098, fax ++31 20 592-4312 url: http://www.cwi.nl/~niels e-mail: Niels.Nes@cwi.nl
On Nov 30, 2007 3:01 PM, Niels Nes
On Fri, Nov 30, 2007 at 02:52:34PM -0700, m h wrote:
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.
Yes, it seems you wouldn't want user tables going in with the system ones by default... I guess I can hack around it by creating another default schema (within SQLAlchemy) called "public" (that's what postgres uses) or something.... Thanks for the clarification. -matt
On Nov 30, 2007 3:01 PM, Niels Nes
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? -matt
On 04-12-2007 23:54:24 -0700, m h wrote:
On Nov 30, 2007 3:01 PM, Niels Nes
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
On Dec 5, 2007 1:05 AM, Fabian Groffen
On 04-12-2007 23:54:24 -0700, m h wrote:
On Nov 30, 2007 3:01 PM, Niels Nes
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?
On Wed, Dec 05, 2007 at 01:11:57AM -0700, m h wrote:
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?
Users can have there own default schema. Schemas cannot be nested, but you can use tables etc from an other schema by using 'schemaname'.'tablename'.'etc'. Why would you want to push/pop schemas? Niels -- Niels Nes, Centre for Mathematics and Computer Science (CWI) Kruislaan 413, 1098 SJ Amsterdam, The Netherlands room C0.02, phone ++31 20 592-4098, fax ++31 20 592-4312 url: http://www.cwi.nl/~niels e-mail: Niels.Nes@cwi.nl
participants (3)
-
Fabian Groffen
-
m h
-
Niels Nes