Skip site navigation (1) Skip section navigation (2)

Re: Command Triggers

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>
Subject: Re: Command Triggers
Date: 2012-02-27 23:30:36
Message-ID: 21501.1330385436@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Andres Freund <andres(at)anarazel(dot)de> writes:
> Sorry for letting this slide.

> Is it worth adding this bit to OpenIntoRel? Not sure if there is danger in 
> allowing anyone to create shared tables

> 	/* In all cases disallow placing user relations in pg_global */
> 	if (tablespaceId == GLOBALTABLESPACE_OID)
> 		ereport(ERROR,
> 				(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
> 				 errmsg("only shared relations can be placed in pg_global 
> tablespace")));

Ugh ... if that's currently allowed, we definitely need to fix it.
But I'm not sure OpenIntoRel is the right place.  I'd have expected
the test to be at some lower level, like heap_create_with_catalog
or so.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Andres FreundDate: 2012-02-27 23:32:26
Subject: Re: Command Triggers, patch v11
Previous:From: Andres FreundDate: 2012-02-27 23:26:05
Subject: Re: Command Triggers

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group