On 2025-Mar-11, Amul Sul wrote:
> I was thinking of something like the attached, which includes your
> test cases from 0001. Perhaps the macro name could be improved.
FWIW I like this general idea. I don't like the proposed names much
though, especially the abuse of ALL_CAPS; and because they op
On 2025-Mar-04, Tom Lane wrote:
> Hmm. I agree that "ALTER CONSTRAINT statement" is off the
> mark here, but I'm not convinced that "FOREIGN KEY" is entirely
> on-point either. The grammar has no way of knowing what kind of
> constraint is being targeted. I do see that ATExecAlterConstraint
> c
On Mon, Mar 10, 2025 at 11:29 PM Álvaro Herrera wrote:
>
> Hello,
>
> I fleshed this out more fully and I think 0001 is good enough to commit.
>
The approach looks good to me, but instead of adding a CAS_flags struct, could
we use macros like SEEN_DEFERRABILITY(bits), SEEN_ENFORCEABILITY(bits),
e
On 2025-Mar-11, jian he wrote:
> but it's better to align CREATE DOMAIN with ALTER DOMAIN.
> For example, the following two logic should behave the same.
>
> create domain d_int as int4 constraint nn1 not null initially immediate;
> alter domain d_int add constraint nn1 not null initially immedia
On Tue, Mar 11, 2025 at 6:21 PM Álvaro Herrera wrote:
>
>
> > seems didn't cover "initially immediate" case for domain.
> > for example:
> > create domain d_int as int4;
> > --- the following two cases should fail.
> > alter domain d_int add constraint nn1 not null initially immediate;
> > alter d
On Tue, Mar 11, 2025 at 1:56 PM Álvaro Herrera wrote:
>
> On 2025-Mar-11, Amul Sul wrote:
>
> > On Mon, Mar 10, 2025 at 11:29 PM Álvaro Herrera
> > wrote:
> >
> > > I fleshed this out more fully and I think 0001 is good enough to commit.
> >
> > The approach looks good to me, but instead of addi
On 2025-Mar-11, jian he wrote:
> this look a little strange?
> if (cas_bits & (CAS_NOT_DEFERRABLE) && seen)
> seen->seen_deferrability = true;
>
> it should be
> if ((cas_bits & CAS_NOT_DEFERRABLE) && seen)
> seen->seen_deferrability = true;
True. And since you mentioned
On 2025-Mar-11, Amul Sul wrote:
> On Mon, Mar 10, 2025 at 11:29 PM Álvaro Herrera
> wrote:
>
> > I fleshed this out more fully and I think 0001 is good enough to commit.
>
> The approach looks good to me, but instead of adding a CAS_flags struct, could
> we use macros like SEEN_DEFERRABILITY(bi
On Tue, Mar 11, 2025 at 1:58 AM Álvaro Herrera wrote:
>
> Hello,
>
> I fleshed this out more fully and I think 0001 is good enough to commit.
>
> I then noticed that constraints on domains are giving bogus error
> messages as well, and the situation is easily improved -- see 0002. I'm
> not so su
Hello,
I fleshed this out more fully and I think 0001 is good enough to commit.
I then noticed that constraints on domains are giving bogus error
messages as well, and the situation is easily improved -- see 0002. I'm
not so sure about this one, mainly because test coverage appears scant.
I need
=?utf-8?Q?=C3=81lvaro?= Herrera writes:
> I just discovered that trying to set a foreign key as NO INHERIT in
> ALTER TABLE ALTER CONSTRAINT returns an absurd error message:
> create table pk (a int primary key);
> create table fk (a int references pk);
> alter table fk alter constraint fk_a_fkey
I just discovered that trying to set a foreign key as NO INHERIT in
ALTER TABLE ALTER CONSTRAINT returns an absurd error message:
create table pk (a int primary key);
create table fk (a int references pk);
alter table fk alter constraint fk_a_fkey deferrable, alter constraint
fk_a_fkey no inheri
On 2025-Mar-04, Nathan Bossart wrote:
> On Tue, Mar 04, 2025 at 07:22:22PM +0100, Álvaro Herrera wrote:
> > I just discovered that trying to set a foreign key as NO INHERIT in
> > ALTER TABLE ALTER CONSTRAINT returns an absurd error message:
> > Here's the fix along with some additional cleanup.
On Tue, Mar 04, 2025 at 07:22:22PM +0100, Álvaro Herrera wrote:
> I just discovered that trying to set a foreign key as NO INHERIT in
> ALTER TABLE ALTER CONSTRAINT returns an absurd error message:
>
> create table pk (a int primary key);
> create table fk (a int references pk);
>
> alter table f
14 matches
Mail list logo