Re: In a partition why 1st time encounter NULL then call minvfunc

2022-08-25 Thread David G. Johnston
On Thursday, August 25, 2022, jian he wrote: > > > _row | nstrict |nstrict--+---+ > 1,1:NULL | [[null]] | MI > 1,2:a| a | MI+'a' > 1,3:b| a+'b' | MI+'a'+'b' > 1,4:NULL | a+'b'-'a' | MI+'a'+'b'-'a' > 1,5:NULL | [[null]] | MI > 1,6

Re: Two questions about "pg_constraint"

2022-08-25 Thread Christophe Pettus
> On Aug 25, 2022, at 21:43, Bryn Llewellyn wrote: > [...] I've read this a few times, and I am having trouble understanding what behavior you were expecting out of PostgreSQL, and what behavior you received that you didn't think was correct. If it is "pg_constraint has a column connamespac

In a partition why 1st time encounter NULL then call minvfunc

2022-08-25 Thread jian he
same question: https://stackoverflow.com/questions/73476732/postgresql-in-a-partition-1st-time-null-then-call-minvfunc dbfilddle source

Re: Two questions about "pg_constraint"

2022-08-25 Thread Bryn Llewellyn
> adrian.kla...@aklaver.com wrote: > >> bryn@yugabyte.comwrote: >> >> Question 1: why does "pg_constraint" have a "connamespace" column? > > create table c1 (id integer, constraint pk1 primary key(id)); > > create table c2 (id integer, constraint pk1 primary key(id)); > ERROR: relation "pk1" a

Re: Information_schema.table_constraints

2022-08-25 Thread Ravi Krishna
https://www.postgresql.org/docs/current/infoschema-table-constraints.html "The view table_constraints contains all constraints belonging to tables that the current user owns or has some privilege other than SELECT on." thank you.  that explains.

Re: Information_schema.table_constraints

2022-08-25 Thread Adrian Klaver
On 8/25/22 13:53, Ravi Krishna wrote: Any idea why select on this table does not yield any output for a user who otherwise can get output for other information_schema tables. Does this table require any special privilege compared to other tables of information_schema. https://www.postgresql.

Information_schema.table_constraints

2022-08-25 Thread Ravi Krishna
Any idea why select on this table does not yield any output for a user who otherwise can get output for other information_schema tables. Does this table require any special privilege compared to other tables of information_schema.Thanks

Re: Restriction on table partition expressions

2022-08-25 Thread David Rowley
On Fri, 26 Aug 2022 at 03:08, James Vanns wrote: > Also, is there a chance that this > limitation will be relaxed in the future? (forgot to answer this part) Certainly not in the near future, I'm afraid. It would require allowing a single index to exist over multiple tables. There has been disc

Re: Restriction on table partition expressions

2022-08-25 Thread David Rowley
On Fri, 26 Aug 2022 at 03:08, James Vanns wrote: > CREATE TABLE foobar( > id BIGINT NOT NULL PRIMARY KEY, > baz VARCHAR NULL DEFAULT NULL > ) PARTITION BY HASH(my_func(id)); > > Error: primary key constraints cannot be used when partition keys > include expressions. > I couldn't find much

Restriction on table partition expressions

2022-08-25 Thread James Vanns
Hey PG community, PG version: 13 Platform: Linux I was wondering if anyone understands why there is the restriction/limitation on using expressions (on a primary/unique key) as part of a table partition definition. E.g. CREATE TABLE foobar( id BIGINT NOT NULL PRIMARY KEY, baz VARCHAR NUL