pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Catalog insertion
10+ messages / 5 participants
[nested] [flat]

* Catalog insertion
@ 2007-07-08 23:51  Carmen Martinez <carmenmtezcruz@yahoo.es>
  0 siblings, 1 reply; 10+ messages in thread

From: Carmen Martinez @ 2007-07-08 23:51 UTC (permalink / raw)
  To: pgsql-admin

Hello,
I am trying to include new tables in the PG catalog. Also, I am doing that using the JDBC interface in a Java program. But when I connect to de Postgress template1 database and I execute the CREATE TABLE sentence  an error message appears saying: "System catalog modifications are currently disallowed". 

Please, I need help to know how to allow to modify the system catalog .

Thank you very much,

Carmen Mtez.



       
---------------------------------

Sé un Mejor Amante del Cine
¿Quieres saber cómo? ¡Deja que otras personas te ayuden!.

^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Catalog insertion
@ 2007-07-09 00:42  Alvaro Herrera <alvherre@commandprompt.com>
  parent: Carmen Martinez <carmenmtezcruz@yahoo.es>
  0 siblings, 1 reply; 10+ messages in thread

From: Alvaro Herrera @ 2007-07-09 00:42 UTC (permalink / raw)
  To: Carmen Martinez <carmenmtezcruz@yahoo.es>; +Cc: pgsql-admin

Carmen Martinez escribió:
> Hello,
> I am trying to include new tables in the PG catalog. Also, I am doing
> that using the JDBC interface in a Java program. But when I connect to
> de Postgress template1 database and I execute the CREATE TABLE
> sentence  an error message appears saying: "System catalog
> modifications are currently disallowed". 
> 
> Please, I need help to know how to allow to modify the system catalog .

What CREATE TABLE exactly?

-- 
Alvaro Herrera                               http://www.PlanetPostgreSQL.org/
"No hay cielo posible sin hundir nuestras raíces
 en la profundidad de la tierra"                        (Malucha Pinto)



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Catalog insertion
@ 2007-07-09 09:22  Carmen Martinez <carmenmtezcruz@yahoo.es>
  parent: Alvaro Herrera <alvherre@commandprompt.com>
  0 siblings, 3 replies; 10+ messages in thread

From: Carmen Martinez @ 2007-07-09 09:22 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@commandprompt.com>; +Cc: pgsql-admin

I want to insert new tables in the pg_catalog schema. So I have to execute a common create table sentence like "Create Table pg_catalog.newTable ....", but I am not allowed to do that and I do not know why. 

Following I show one of the sentences I execute and the error messages


One of the tables I try to create is:

CREATE TABLE pg_catalog.COL_LIST ( OBJ OID NOT NULL, COL OID NOT NULL, T_TYPE numeric(1)  NOT NULL, LEN numeric(2)  NOT NULL, COM varchar(100) ,  PRIMARY KEY  (OBJ, COL) ,  CONSTRAINT LEN_TOO_LONG_IN_COL_LIST CHECK (LEN>=1 AND LEN<=10),  CONSTRAINT TYPE_MUST_BE_1_2_o_3 CHECK (T_TYPE=1 OR T_TYPE=2 OR T_TYPE=3))

ERROR: permission denied to create "pg_catalog.col_list"
DETAIL:  System catalog modifications are currently disallowed.


Thanks

Alvaro Herrera <alvherre@commandprompt.com> escribió: Carmen Martinez escribió:
> Hello,
> I am trying to include new tables in the PG catalog. Also, I am doing
> that using the JDBC interface in a Java program. But when I connect to
> de Postgress template1 database and I execute the CREATE TABLE
> sentence  an error message appears saying: "System catalog
> modifications are currently disallowed". 
> 
> Please, I need help to know how to allow to modify the system catalog .

What CREATE TABLE exactly?

-- 
Alvaro Herrera                               http://www.PlanetPostgreSQL.org/
"No hay cielo posible sin hundir nuestras raíces
 en la profundidad de la tierra"                        (Malucha Pinto)


 		
---------------------------------

LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com

^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Catalog insertion
@ 2007-07-09 13:33  Alvaro Herrera <alvherre@commandprompt.com>
  parent: Carmen Martinez <carmenmtezcruz@yahoo.es>
  2 siblings, 1 reply; 10+ messages in thread

From: Alvaro Herrera @ 2007-07-09 13:33 UTC (permalink / raw)
  To: Carmen Martinez <carmenmtezcruz@yahoo.es>; +Cc: pgsql-admin

Carmen Martinez escribió:
> I want to insert new tables in the pg_catalog schema. So I have to
> execute a common create table sentence like "Create Table
> pg_catalog.newTable ....", but I am not allowed to do that and I do
> not know why. 
> 
> Following I show one of the sentences I execute and the error messages
> 
> 
> One of the tables I try to create is:
> 
> CREATE TABLE pg_catalog.COL_LIST ( OBJ OID NOT NULL, COL OID NOT NULL,
> T_TYPE numeric(1)  NOT NULL, LEN numeric(2)  NOT NULL, COM
> varchar(100) ,  PRIMARY KEY  (OBJ, COL) ,  CONSTRAINT
> LEN_TOO_LONG_IN_COL_LIST CHECK (LEN>=1 AND LEN<=10),  CONSTRAINT
> TYPE_MUST_BE_1_2_o_3 CHECK (T_TYPE=1 OR T_TYPE=2 OR T_TYPE=3))
> 
> ERROR: permission denied to create "pg_catalog.col_list"
> DETAIL:  System catalog modifications are currently disallowed.

Oh, you can't do that.  It's disallowed by policy.  If you want to
create catalogs you need to be in standalone or bootstrap mode
(typically they are created by declaring a src/include/catalog/*.h file
and having it be included in postgres.bki by the genbki script).

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Catalog insertion
@ 2007-07-09 14:10  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Carmen Martinez <carmenmtezcruz@yahoo.es>
  2 siblings, 0 replies; 10+ messages in thread

From: Tom Lane @ 2007-07-09 14:10 UTC (permalink / raw)
  To: Carmen Martinez <carmenmtezcruz@yahoo.es>; +Cc: Alvaro Herrera <alvherre@commandprompt.com>; pgsql-admin

Carmen Martinez <carmenmtezcruz@yahoo.es> writes:
> I want to insert new tables in the pg_catalog schema.

Why do you think that is a good idea?  pg_catalog is for tables used by
the system itself, and it's going to take a lot more than a "create
table" to teach the system to work with a new catalog.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Catalog insertion
@ 2007-07-09 19:45  Steve Holdoway <steve.holdoway@firetrust.com>
  parent: Carmen Martinez <carmenmtezcruz@yahoo.es>
  2 siblings, 0 replies; 10+ messages in thread

From: Steve Holdoway @ 2007-07-09 19:45 UTC (permalink / raw)
  To: pgsql-admin

Sounds like a Bad Idea(tm) to me. If you want to create extra systemmy tables, then why not set up your own private resources, and put them there instead???

Steve

On Mon, 9 Jul 2007 11:22:05 +0200 (CEST)
Carmen Martinez <carmenmtezcruz@yahoo.es> wrote:

> I want to insert new tables in the pg_catalog schema. So I have to execute a common create table sentence like "Create Table pg_catalog.newTable ....", but I am not allowed to do that and I do not know why. 
> 
> Following I show one of the sentences I execute and the error messages
> 
> 
> One of the tables I try to create is:
> 
> CREATE TABLE pg_catalog.COL_LIST ( OBJ OID NOT NULL, COL OID NOT NULL, T_TYPE numeric(1)  NOT NULL, LEN numeric(2)  NOT NULL, COM varchar(100) ,  PRIMARY KEY  (OBJ, COL) ,  CONSTRAINT LEN_TOO_LONG_IN_COL_LIST CHECK (LEN>=1 AND LEN<=10),  CONSTRAINT TYPE_MUST_BE_1_2_o_3 CHECK (T_TYPE=1 OR T_TYPE=2 OR T_TYPE=3))
> 
> ERROR: permission denied to create "pg_catalog.col_list"
> DETAIL:  System catalog modifications are currently disallowed.
> 
> 
> Thanks
> 
> Alvaro Herrera <alvherre@commandprompt.com> escribió: Carmen Martinez escribió:
> > Hello,
> > I am trying to include new tables in the PG catalog. Also, I am doing
> > that using the JDBC interface in a Java program. But when I connect to
> > de Postgress template1 database and I execute the CREATE TABLE
> > sentence  an error message appears saying: "System catalog
> > modifications are currently disallowed". 
> > 
> > Please, I need help to know how to allow to modify the system catalog .
> 
> What CREATE TABLE exactly?
> 
> -- 
> Alvaro Herrera                               http://www.PlanetPostgreSQL.org/
> "No hay cielo posible sin hundir nuestras raíces
>  en la profundidad de la tierra"                        (Malucha Pinto)
> 
> 
>  		
> ---------------------------------
> 
> LLama Gratis a cualquier PC del Mundo.
> Llamadas a fijos y móviles desde 1 céntimo por minuto.
> http://es.voice.yahoo.com



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Catalog insertion
@ 2007-07-10 09:03  Carmen Martinez <carmenmtezcruz@yahoo.es>
  parent: Alvaro Herrera <alvherre@commandprompt.com>
  0 siblings, 1 reply; 10+ messages in thread

From: Carmen Martinez @ 2007-07-10 09:03 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@commandprompt.com>; Tom Lane <tgl@sss.pgh.pa.us>; Steve Holdoway <steve.holdoway@firetrust.com>; +Cc: pgsql-admin


I know all you say, but we actually are trying to extend the postresql with new data types, and they must be theorically in the system catalog. Also, these new data types go with some functions for manage it. 

We have also implemented this in Oracle and now we want to do this with postgresql. 

Any idea it would be welcome. But if this possibility is disallowed by policy, and I use the database as a server, how can I solve it?. Do I have to disallowed all conexions and then do these tasks in the server?.

Ahh, I am working in windows so please take it into account!.

Thank you very much
Carmen.


Alvaro Herrera <alvherre@commandprompt.com> escribió: Carmen Martinez escribió:
> I want to insert new tables in the pg_catalog schema. So I have to
> execute a common create table sentence like "Create Table
> pg_catalog.newTable ....", but I am not allowed to do that and I do
> not know why. 
> 
> Following I show one of the sentences I execute and the error messages
> 
> 
> One of the tables I try to create is:
> 
> CREATE TABLE pg_catalog.COL_LIST ( OBJ OID NOT NULL, COL OID NOT NULL,
> T_TYPE numeric(1)  NOT NULL, LEN numeric(2)  NOT NULL, COM
> varchar(100) ,  PRIMARY KEY  (OBJ, COL) ,  CONSTRAINT
> LEN_TOO_LONG_IN_COL_LIST CHECK (LEN>=1 AND LEN<=10),  CONSTRAINT
> TYPE_MUST_BE_1_2_o_3 CHECK (T_TYPE=1 OR T_TYPE=2 OR T_TYPE=3))
> 
> ERROR: permission denied to create "pg_catalog.col_list"
> DETAIL:  System catalog modifications are currently disallowed.

Oh, you can't do that.  It's disallowed by policy.  If you want to
create catalogs you need to be in standalone or bootstrap mode
(typically they are created by declaring a src/include/catalog/*.h file
and having it be included in postgres.bki by the genbki script).

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings


 		
---------------------------------

LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com

^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Catalog insertion
@ 2007-07-10 09:43  Peter Childs <peterachilds@gmail.com>
  parent: Carmen Martinez <carmenmtezcruz@yahoo.es>
  0 siblings, 1 reply; 10+ messages in thread

From: Peter Childs @ 2007-07-10 09:43 UTC (permalink / raw)
  To: ; +Cc: pgsql-admin

On 10/07/07, Carmen Martinez <carmenmtezcruz@yahoo.es> wrote:
>
>
> I know all you say, but we actually are trying to extend the postresql
> with new data types, and they must be theorically in the system catalog.
> Also, these new data types go with some functions for manage it.
>
> We have also implemented this in Oracle and now we want to do this with
> postgresql.
>
> Any idea it would be welcome. But if this possibility is disallowed by
> policy, and I use the database as a server, how can I solve it?. Do I have
> to disallowed all conexions and then do these tasks in the server?.
>
> Ahh, I am working in windows so please take it into account!.



"Create type" I think might be what you need then.

see http://www.postgresql.org/docs/8.2/static/sql-createtype.html

Peter.


Thank you very much
> Carmen.
>
>
> *Alvaro Herrera <alvherre@commandprompt.com>* escribió:
>
> Carmen Martinez escribió:
> > I want to insert new tables in the pg_catalog schema. So I have to
> > execute a common create table sentence like "Create Table
> > pg_catalog.newTable ....", but I am not allowed to do that and I do
> > not know why.
> >
> > Following I show one of the sentences I execute and the error messages
> >
> >
> > One of the tables I try to create is:
> >
> > CREATE TABLE pg_catalog.COL_LIST ( OBJ OID NOT NULL, COL OID NOT NULL,
> > T_TYPE numeric(1) NOT NULL, LEN numeric(2) NOT NULL, COM
> > varchar(100) , PRIMARY KEY (OBJ, COL) , CONSTRAINT
> > LEN_TOO_LONG_IN_COL_LIST CHECK (LEN>=1 AND LEN<=10), CONSTRAINT
> > TYPE_MUST_BE_1_2_o_3 CHECK (T_TYPE=1 OR T_TYPE=2 OR T_TYPE=3))
> >
> > ERROR: permission denied to create "pg_catalog.col_list"
> > DETAIL: System catalog modifications are currently disallowed.
>
> Oh, you can't do that. It's disallowed by policy. If you want to
> create catalogs you need to be in standalone or bootstrap mode
> (typically they are created by declaring a src/include/catalog/*.h file
> and having it be included in postgres.bki by the genbki script).
>
> --
> Alvaro Herrera http://www.CommandPrompt.com/
> The PostgreSQL Company - Command Prompt, Inc.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>
>
> ------------------------------
>
> LLama Gratis a cualquier PC del Mundo.
> Llamadas a fijos y móviles desde 1 céntimo por minuto.
> http://es.voice.yahoo.com<http://us.rd.yahoo.com/mail/es/tagline/messenger/*http://es.voice.yahoo...;
>
>

^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Catalog insertion
@ 2007-07-10 11:06  Carmen Martinez <carmenmtezcruz@yahoo.es>
  parent: Peter Childs <peterachilds@gmail.com>
  0 siblings, 1 reply; 10+ messages in thread

From: Carmen Martinez @ 2007-07-10 11:06 UTC (permalink / raw)
  To: Peter Childs <peterachilds@gmail.com>; +Cc: pgsql-admin

I'd like to use the same system we did with oracle due all the rdbms use a catalog in order to store their system tables and structures. 
Using the CREATE TYPE sentence implies a new implementation totally different from the previous one. 

Peter Childs <peterachilds@gmail.com> escribió: 

On 10/07/07, Carmen Martinez <carmenmtezcruz@yahoo.es> wrote: 
I know all you say, but we actually are trying to extend the postresql with new data types, and they must be theorically in the system catalog. Also, these new data types go with some functions for manage it. 

 We have also implemented this in Oracle and now we want to do this with postgresql. 

Any idea it would be welcome. But if this possibility is disallowed by policy, and I use the database as a server, how can I solve it?. Do I have to disallowed all conexions and then do these tasks in the server?. 

Ahh, I am working in windows so please take it into account!.

"Create type" I think might be what you need then.

see  http://www.postgresql.org/docs/8.2/static/sql-createtype.html

Peter.
 

 Thank you very much
Carmen.


Alvaro Herrera < alvherre@commandprompt.com> escribió: Carmen Martinez escribió: 
> I want to insert new tables in the pg_catalog schema. So I have to
> execute a common create table sentence like  "Create Table
> pg_catalog.newTable ....", but I am not allowed to do that and I do
> not know why. 
> 
> Following I show one of the sentences I execute and the error messages
>  
> 
> One of the tables I try to create is:
> 
> CREATE TABLE pg_catalog.COL_LIST ( OBJ OID NOT NULL, COL OID NOT NULL,
> T_TYPE numeric(1)  NOT NULL, LEN numeric(2)  NOT NULL, COM
> varchar(100) ,  PRIMARY KEY  (OBJ, COL) ,  CONSTRAINT 
> LEN_TOO_LONG_IN_COL_LIST CHECK (LEN>=1 AND LEN<=10),  CONSTRAINT
> TYPE_MUST_BE_1_2_o_3 CHECK (T_TYPE=1 OR T_TYPE=2 OR T_TYPE=3))
> 
> ERROR: permission denied to create "pg_catalog.col_list" 
> DETAIL:  System catalog modifications are currently disallowed.

Oh, you can't do that.  It's disallowed by policy.  If you want to
create catalogs you need to be in standalone or bootstrap mode
 (typically they are created by declaring a src/include/catalog/*.h  file
and having it be included in postgres.bki by the genbki script).

-- 
Alvaro Herrera                                 http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings 


    

---------------------------------

LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
 http://es.voice.yahoo.com


 

 		
---------------------------------

LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com

^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Catalog insertion
@ 2007-07-10 13:21  Alvaro Herrera <alvherre@commandprompt.com>
  parent: Carmen Martinez <carmenmtezcruz@yahoo.es>
  0 siblings, 0 replies; 10+ messages in thread

From: Alvaro Herrera @ 2007-07-10 13:21 UTC (permalink / raw)
  To: Carmen Martinez <carmenmtezcruz@yahoo.es>; +Cc: Peter Childs <peterachilds@gmail.com>; pgsql-admin

Carmen Martinez escribió:
> I'd like to use the same system we did with oracle due all the rdbms
> use a catalog in order to store their system tables and structures. 
> Using the CREATE TYPE sentence implies a new implementation totally
> different from the previous one. 

We may be able to help you, but we can't if you don't say what you
actually want to do (rather than _how_ you think you should do it).
Keep in mind that this is a different system from Oracle and things may
be done differently.

There's a spanish mail list (pgsql-es-ayuda) on this very same server.
You may be able to explain yourself better there (and I'll be able to
respond more quickly).

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



^ permalink  raw  reply  [nested|flat] 10+ messages in thread


end of thread, other threads:[~2007-07-10 13:21 UTC | newest]

Thread overview: 10+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-07-08 23:51 Catalog insertion Carmen Martinez <carmenmtezcruz@yahoo.es>
2007-07-09 00:42 ` Alvaro Herrera <alvherre@commandprompt.com>
2007-07-09 09:22   ` Carmen Martinez <carmenmtezcruz@yahoo.es>
2007-07-09 13:33     ` Alvaro Herrera <alvherre@commandprompt.com>
2007-07-10 09:03       ` Carmen Martinez <carmenmtezcruz@yahoo.es>
2007-07-10 09:43         ` Peter Childs <peterachilds@gmail.com>
2007-07-10 11:06           ` Carmen Martinez <carmenmtezcruz@yahoo.es>
2007-07-10 13:21             ` Alvaro Herrera <alvherre@commandprompt.com>
2007-07-09 14:10     ` Tom Lane <tgl@sss.pgh.pa.us>
2007-07-09 19:45     ` Steve Holdoway <steve.holdoway@firetrust.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox