Re:Re: timestamptz test failed by postgresql 6.5.0

2021-01-03 Thread yangtao
em~~~, I read the release notes [1] right now. I try my best fix it as you suggested, and persuade my partners to not use version 9.6.0. Thanks for your help! Best Regards! Tao At 2021-01-04 14:36:30, "Tom Lane" wrote: >yangtao writes: >> Yes, I compile it by configure --with-

Re: timestamptz test failed by postgresql 6.5.0

2021-01-03 Thread Tom Lane
yangtao writes: > Yes, I compile it by configure --with-system-tzdata, should I remove it? > What's more, because some other components dependency, I must use version > 9.6.0. No. For god's sake, fix whatever components you are using that think they must have 9.6.0 rather than 9.6.later. Read

Re:Re: timestamptz test failed by postgresql 6.5.0

2021-01-03 Thread yangtao
Tom, Thanks! Yes, I compile it by configure --with-system-tzdata, should I remove it? What's more, because some other components dependency, I must use version 9.6.0. I also have tried the 9.6.5 version, find the timestamptz test case is updated. Best Regards! Tao At 2021-01-04 14:07:

Re: timestamptz test failed by postgresql 6.5.0

2021-01-03 Thread Tom Lane
yangtao writes: > Recently, I compile the Postgresql 9.6.0 on Linux by myself. However, I meet > one problem about the timestamptz.sql test case. > The expected timestamptz.out is different from the result of timestamptz.out > for ime zone America/Caracas and > America/Santiago Hm, did you use

timestamptz test failed by postgresql 6.5.0

2021-01-03 Thread yangtao
Recently, I compile the Postgresql 9.6.0 on Linux by myself. However, I meet one problem about the timestamptz.sql test case. The expected timestamptz.out is different from the result of timestamptz.out for ime zone America/Caracas and America/Santiago Part of expected timestamptz.out : DROP TA

Re: Crashing on insert to GIN index

2021-01-03 Thread Jack Orenstein
Thank you, the missing STORAGE clause was the problem. As for the non-standard coding: I did start out with more correct coding, and it wandered off as I tried to figure out what was causing the crash. Jack Orenstein On Sun, Jan 3, 2021 at 7:57 PM Tom Lane wrote: > Jack Orenstein writes: > >

Re: Crashing on insert to GIN index

2021-01-03 Thread Tom Lane
Jack Orenstein writes: > I am defining a new type, FooBar, and trying to create a GIN index for it. > Everything is working well without the index. FooBar values are getting > into a table, and being retrieved and selected correctly. But I'm getting a > crash when I add a GIN index on a column of

Re: Possible trigger bug? function call argument literalised

2021-01-03 Thread Adrian Klaver
On 1/3/21 1:44 PM, Thiemo Kellner wrote: So if I am following you are trying to set up a dynamic FK like process to INFORMATION_SCHEMA.ROUTINES on INSERT to CALCULATION_METHOD? Perfectly summarised. If that is the case my previous suggestion of finding the CURRENT_SCHEMA inside the functi

Re: Possible trigger bug? function call argument literalised

2021-01-03 Thread Thiemo Kellner
Quoting Adrian Klaver : Familiar with it, I have worked in farming(outdoor and indoor(greenhouse)) industries. Cool (https://en.wikipedia.org/wiki/Growing_degree-day). It is a measure for energy an organism can consume in a specific day for its development. Also used to anticipate pe

Crashing on insert to GIN index

2021-01-03 Thread Jack Orenstein
I am defining a new type, FooBar, and trying to create a GIN index for it. Everything is working well without the index. FooBar values are getting into a table, and being retrieved and selected correctly. But I'm getting a crash when I add a GIN index on a column of type FooBar. Here is the operat

Re: Possible trigger bug? function call argument literalised

2021-01-03 Thread Adrian Klaver
On 1/3/21 11:19 AM, Thiemo Kellner wrote: Quoting Adrian Klaver : Can you provide an outline form of what you are trying to accomplish? Hm, making myself understood. ;-) So from the very beginning. There is the concept of growing degree days Familiar with it, I have worked in farming(outd

Re: Possible trigger bug? function call argument literalised

2021-01-03 Thread Thiemo Kellner
Quoting Adrian Klaver : Can you provide an outline form of what you are trying to accomplish? Hm, making myself understood. ;-) So from the very beginning. There is the concept of growing degree days (https://en.wikipedia.org/wiki/Growing_degree-day). It is a measure for energy an organis

Re: Possible trigger bug? function call argument literalised

2021-01-03 Thread Adrian Klaver
On 1/3/21 10:27 AM, Thiemo Kellner wrote: Quoting Adrian Klaver : Well, I guess, I can put the correct schema at installation, but would have liked to have a more general approach. Furthermore, I think this also implies that installation can only be done by psql. :-s Why not grab the CURREN

Re: Possible trigger bug? function call argument literalised

2021-01-03 Thread Thiemo Kellner
Quoting Adrian Klaver : Well, I guess, I can put the correct schema at installation, but would have liked to have a more general approach. Furthermore, I think this also implies that installation can only be done by psql. :-s Why not grab the CURRENT_SCHEMA in the function?: DECLARE

Re: Possible trigger bug? function call argument literalised

2021-01-03 Thread Adrian Klaver
On 1/3/21 9:45 AM, Thiemo Kellner wrote: Quoting Tom Lane : Thiemo Kellner writes: create trigger CALCULATION_METHOD_BR_IU    before insert on CALCULATION_METHOD    for each row    execute function METHOD_CHECK(current_schema); Executing such, the string "current_schema" gets literalised,

Re: Getting "could not read block" error when creating an index on a function.

2021-01-03 Thread Demitri Muna
Thank you for the responses! I was going to go with a materialized view, but then realized that since the dataset is static it’s really no different from just creating a new table and indexing that. The suggestions provide useful advice for the future though. Cheers, Demitri > On Dec 30, 202

Re: Possible trigger bug? function call argument literalised

2021-01-03 Thread Thiemo Kellner
Quoting Tom Lane : Thiemo Kellner writes: create trigger CALCULATION_METHOD_BR_IU before insert on CALCULATION_METHOD for each row execute function METHOD_CHECK(current_schema); Executing such, the string "current_schema" gets literalised, i.e. single quoted: Yup, per the CREAT

Re: Possible trigger bug? function call argument literalised

2021-01-03 Thread Thiemo Kellner
Quoting Rob Sargent : The function definition doesn’t name any parameters? Nope, trigger functions cannot, according to documentation. Parameters can be passed as list/array of values though. I have no clue about why this needs to be so awful/awesome. -- S/MIME Public Key: https:

RE: Max# of tablespaces

2021-01-03 Thread Thomas Flatley
Excellent - thanks for the fast response - it was an oracle dba that set it up initially so that may explain it - Thanks very much -Original Message- From: Tom Lane Sent: Sunday, January 3, 2021 12:27 PM To: Thomas Flatley Cc: pgsql-general@lists.postgresql.org Subject: Re: Max# of t

Re: Possible trigger bug? function call argument literalised

2021-01-03 Thread Tom Lane
Thiemo Kellner writes: > create trigger CALCULATION_METHOD_BR_IU >before insert on CALCULATION_METHOD >for each row >execute function METHOD_CHECK(current_schema); > Executing such, the string "current_schema" gets literalised, i.e. > single quoted: Yup, per the CREATE TRIGGER docu

Re: Possible trigger bug? function call argument literalised

2021-01-03 Thread Thiemo Kellner
I fixed the array and error handling of the function. create or replace function METHOD_CHECK() returns trigger language plpgsql stable as $body$ declare V_COUNT smallint; begin if TG_NARGS != 1 then raise exception using

Re: Possible trigger bug? function call argument literalised

2021-01-03 Thread Rob Sargent
> On Jan 3, 2021, at 10:08 AM, Thiemo Kellner > wrote: > > Hi > > I created a table with trigger and according trigger and trigger function as > > drop table if exists CALCULATION_METHOD cascade; > create table CALCULATION_METHOD (ID > uuid >

Re: Max# of tablespaces

2021-01-03 Thread Tom Lane
Thomas Flatley writes: > Hello, I've checked the docs but cant seem to find if there is a max # of > tablespaces allowed - I've come across a 9.5 env with 1600 tablespaces - they > want to double that - Oracle's max is 64k, I'm not particularly worried about > hitting a wall, if there is one ,

Possible trigger bug? function call argument literalised

2021-01-03 Thread Thiemo Kellner
Hi I created a table with trigger and according trigger and trigger function as drop table if exists CALCULATION_METHOD cascade; create table CALCULATION_METHOD (ID uuid not null default uuid

Why not report ERROR when "concurrent insert in progress within table"?

2021-01-03 Thread Meng Qingzhong
Hi, all, When using 'create index concurrently', we use a MVCC snaptshot, we should not see tuples that is HEAPTUPLE_INSERT_IN_PROGRESS. I think we should report an ERROR in this case. But, we report WARNING now. In the early days, it indeed report ERROR, but the behaviour is changed by commit 1d

Max# of tablespaces

2021-01-03 Thread Thomas Flatley
Hello, I've checked the docs but cant seem to find if there is a max # of tablespaces allowed - I've come across a 9.5 env with 1600 tablespaces - they want to double that - Oracle's max is 64k, I'm not particularly worried about hitting a wall, if there is one , outside of maintenance issues -