Re: [pgAdmin4][Patch]: RM_ 2620 - Getting error "Violates check constraint" while creating pgAgent job

From: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
To: Surinder Kumar <surinder(dot)kumar(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgAdmin4][Patch]: RM_ 2620 - Getting error "Violates check constraint" while creating pgAgent job
Date: 2017-08-04 14:04:02
Message-ID: CANxoLDfsOGRo_2CiwC0LYe6Hb9CGCZEKhirmxkhmJ6KLA3VwcA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)kumar(at)enterprisedb(dot)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-9517Mobile: +91 976-788-8246*

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Sarah McAlear 2017-08-07 02:39:07 Re: [pgAdmin4][PATCH] Refactor and change of implementation of keyboard_shortcuts function dependencies
Previous Message Akshay Joshi 2017-08-04 14:03:16 pgAdmin 4 commit: Set the database name to blank('') when job type is s