Re: [pgAdmin4][Patch]: RM_ 2620 - Getting error "Violates checkconstraint" while creating pgAgent job - Mailing list pgadmin-hackers

From Akshay Joshi
Subject Re: [pgAdmin4][Patch]: RM_ 2620 - Getting error "Violates checkconstraint" while creating pgAgent job
Date
Msg-id CANxoLDfsOGRo_2CiwC0LYe6Hb9CGCZEKhirmxkhmJ6KLA3VwcA@mail.gmail.com
Whole thread Raw
In response to [pgAdmin4][Patch]: RM_ 2620 - Getting error "Violates checkconstraint" while creating pgAgent job  (Surinder Kumar <surinder.kumar@enterprisedb.com>)
List pgadmin-hackers
Hi Surinder 

As per discussion, this should be fixed at server side instead of client(js) side. I have fixed and committed the code. 

On Wed, Aug 2, 2017 at 6:07 PM, Surinder Kumar <surinder.kumar@enterprisedb.com> wrote:

Hi

It gives error because database value is passed in query generated when jobstep > kind == 'batch'.
the database value must be ‘’, if jobstep > kind == 'batch' as per check constraint:

"pga_jobstep_check1" CHECK (jstdbname <> ''::name AND jstkind = 's'::bpchar OR jstdbname = ''::name AND (jstkind = 'b'::bpchar OR jstconnstr <> ''
::text))

Please find attached patch and review.

Thanks,
Surinder




--
Akshay Joshi
Principal Software Engineer 


Phone: +91 20-3058-9517
Mobile: +91 976-788-8246

pgadmin-hackers by date:

Previous
From: Akshay Joshi
Date:
Subject: pgAdmin 4 commit: Set the database name to blank('') when job type iss
Next
From: Sarah McAlear
Date:
Subject: Re: [pgAdmin4][PATCH] Refactor and change of implementation ofkeyboard_shortcuts function dependencies