Hello,
Sorry for delay... I had to go on leave..
Checked, it's our mistake here. The issue is not what I described, but in the
replicated database where the constraint was not updated. Correcting the
constraint there solved this issue.
Sorry for not checking properly before coming here.
Hap
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
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
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 = '
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
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