Re: Unable to start replica after failover

2022-08-22 Thread Kyotaro Horiguchi
> What additional information is needed? Usually server logs and the output of pg_rewind at the trouble time are needed as the first step. > Next, pg_rewind returns errors while reading the log from the backup > back, looking for the last checkpoint, which is quite reasonable > because, once a ne

Re: Support for dates before 4713 BC

2022-08-22 Thread Tom Browder
This is a bit off topic, but Raku, the sister language of Perl, has a built-in Date object that should be able to handle the situation. I wonder if there is a possibility of someday having an interface with Raku as with Perl. Note Raku has an excellent module to use PostgreSQL. Blessings. -Tom

Re: Support for dates before 4713 BC

2022-08-22 Thread Alvaro Herrera
Hello Stefan, Alexander, On 2022-Aug-22, stefan eichert wrote: > I can also fully support what Alex has written. I am an archaeologist at > the Natural History Museum Vienna and PostgreSQL is a perfect Open Source > software and we really love working with it for our archaeological and > (pre)his

Re: Creating constraint dynamically

2022-08-22 Thread jian he
On Mon, Aug 22, 2022 at 12:59 PM sivapostg...@yahoo.com < sivapostg...@yahoo.com> wrote: > Hello, > Using PG 11.4 > > We populate constraint string dynamically and add it to the table with > alter table command. It gets added, but without the required brackets. > What we build is > ALTER TABLE pu

Re: Support for dates before 4713 BC

2022-08-22 Thread stefan eichert
Dear All, I can also fully support what Alex has written. I am an archaeologist at the Natural History Museum Vienna and PostgreSQL is a perfect Open Source software and we really love working with it for our archaeological and (pre)historical projects. The limitation of dates before 4713 BC howe

Re: Creating constraint dynamically

2022-08-22 Thread Francisco Olarte
On Mon, 22 Aug 2022 at 09:29, sivapostg...@yahoo.com wrote: > We populate constraint string dynamically and add it to the table with alter > table command. It gets added, but without the required brackets. Brackets are NOT required in your example. You are doing a classic form, OR of ANDs, some

Re: Creating constraint dynamically

2022-08-22 Thread JITEN KUMAR SHAH
On 8/22/22 13:09, Wim Bertels wrote: sivapostg...@yahoo.com schreef op ma 22-08-2022 om 07:29 [+]: ALTER TABLE public.tx_barcode_stock ADD CONSTRAINT "tx_barcode_stock_CK1" CHECK ( (branchcode = '1'::bpchar  and barcodeitem = 'Y'::bpchar and closingstock >= 0::numeric)  Or (branchcode = '

Re: Creating constraint dynamically

2022-08-22 Thread Wim Bertels
sivapostg...@yahoo.com schreef op ma 22-08-2022 om 07:29 [+]: > > ALTER TABLE public.tx_barcode_stock  > ADD CONSTRAINT "tx_barcode_stock_CK1" CHECK  > ( (branchcode = '1'::bpchar  and barcodeitem = 'Y'::bpchar and > closingstock >= 0::numeric)  Or (branchcode = '1' and barcodeitem = > 'N'::bp

Re: Creating constraint dynamically

2022-08-22 Thread sivapostg...@yahoo.com
Hello,Using PG 11.4 We populate constraint string dynamically and add it to the table with alter table command.  It gets added, but without the required brackets.  What we build isALTER TABLE public.tx_barcode_stock ADD CONSTRAINT "tx_barcode_stock_CK1" CHECK ( (branchcode = '1'::bpchar  and bar

Re: Can I get the number of results plus the results with a single query?

2022-08-22 Thread Wim Bertels
Perry Smith schreef op ma 15-08-2022 om 08:49 [-0500]: > I like to have what I call “baby sitting” messages such as “Completed > 15 out of 1023”.  To do this, I need the number of results a query > returns but I also need the results. > > Currently I’m doing this with two queries such as: > >