Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUtde-0000Yg-NF for pgadmin-hackers@arkaria.postgresql.org; Wed, 03 Aug 2016 10:43:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bUtdd-0006S2-KH for pgadmin-hackers@arkaria.postgresql.org; Wed, 03 Aug 2016 10:43:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bUtdc-0006Rr-1j for pgadmin-hackers@postgresql.org; Wed, 03 Aug 2016 10:43:00 +0000 Received: from mail-it0-x22a.google.com ([2607:f8b0:4001:c0b::22a]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bUtdY-0000dc-Iq for pgadmin-hackers@postgresql.org; Wed, 03 Aug 2016 10:42:59 +0000 Received: by mail-it0-x22a.google.com with SMTP id f6so293494612ith.1 for ; Wed, 03 Aug 2016 03:42:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=PmDntzu/vIcuv/0/bZc4Lk4sVg18HwgB0qjSIRKoRQQ=; b=XTFJNXngZV/w0DJSyMr9cIimcfYdfAV0erX7Zx7nOso0pJ+t03HIvy2AAHpGT8C3n6 VWPwpFH8VO4mTycaiaBzN7R4/Ig6FzVSv4ujc/RpTqcdauNczMumBOkEL+Q0aqd1seKA /C497iieyXm2tKttnP9oYtMMOJRnvy4cFoBgDLqQ/KFRo0mhvfsCPXU2ij2d4L1f4ATj AnJxB0h83ZuW09tC2MUuijh0A2i4JZY0wvnlRDx5H6OaYqkJ22DNvpB1XaAvfHY4Pc4o cTHRM0tVeXNjiDcy5H6Iqt8NToHlYadFn8ti57hSJPMKWm66XIQuKAgNxK+Zwg2wjcpU nxSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=PmDntzu/vIcuv/0/bZc4Lk4sVg18HwgB0qjSIRKoRQQ=; b=lMn8l8vX+Qft+tJWnExQBCDOIof1FBv2pwkr+iOmcYQ3OJx8z1eBmTHKjNBRU1He7/ ZZUFf+wUzYsU0+7ZyR8bU+I8MA7MatGc1tQrs32xTlEAYO/VfjHD+TqJKdfRRRen3VXE zOG6Z3UkPLxdgyvkEDfVNYKcGMvYDTQ1ahZabLtqowqOOXjOzvUWv/NSbd0INJTPDQDm iadBABe/JuiiNrwvOdqQrtIGthd/ibDohwjUsGjat6KD6zzHAIu+sX40bBkoaCQkpueC pH3The4zfqubISylMc/DcAA9WYlq/rbwOBSn5o79YcnBBzRwvC8suwnpGQ2wz58lcweh rAPQ== X-Gm-Message-State: AEkooutY0hyh8wHc2yi4jNJqJmO+o5NuaXtPG9m4hTwWcChgAtZCUU50MqN32+GJ8zekIwDXbHRwZ8tl47/10A== X-Received: by 10.36.80.2 with SMTP id m2mr25992902itb.37.1470220973717; Wed, 03 Aug 2016 03:42:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.208.97 with HTTP; Wed, 3 Aug 2016 03:42:53 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Wed, 3 Aug 2016 11:42:53 +0100 Message-ID: Subject: Re: Patch for RM1500 other issues [pgAdmin4] To: Harshal Dhumal Cc: pgadmin-hackers Content-Type: text/plain; charset=UTF-8 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org Hi On Wed, Aug 3, 2016 at 7:36 AM, Harshal Dhumal wrote: > Hi, > > PFA patch for RM1500. > > Changes/Issues fixed: > > 1] datamodel.js: For collection type added check before adding model into > "changed" list instead of adding it blindly. > > 2] Type casting from str to int of column properties like attlen, > attpricision. > > 3] Added missing data formating when adding new column to existing table > (from table edit mode). > > 4] Added more validation for Foreign key constraint. > > 5] Column.js: Column grid (in table edit mode) show proper disabled color > for disabled cell when grid renders. > > 6] All constraints and index js added idattribute to distinguish which > s/constraint or s/index is updated on server side. > > 7] Column update.sql: Fixed sql when altering column data type. The issue > was when we alter data type from which has length and precision to data type > which don't have these properties and vice versa. > For e.g. alter data type numeric(10,12) to real (and vice versa) > > 8] Renaming constraint (RM1500). I get the following error when renaming a primary key. I have restarted my app sever and done a hard reload/clear cache on my browser. The generated SQL is: ALTER TABLE public.foo RENAME CONSTRAINT foo_pkey TO foo_pkey1; 2016-08-03 11:39:43,764: INFO werkzeug: 127.0.0.1 - - [03/Aug/2016 11:39:43] "PUT /browser/table/obj/1/1/12403/2200/158521 HTTP/1.1" 500 - Traceback (most recent call last): File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 2000, in __call__ return self.wsgi_app(environ, start_response) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1991, in wsgi_app response = self.make_response(self.handle_exception(e)) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1567, in handle_exception reraise(exc_type, exc_value, tb) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1988, in wsgi_app response = self.full_dispatch_request() File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1641, in full_dispatch_request rv = self.handle_user_exception(e) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1544, in handle_user_exception reraise(exc_type, exc_value, tb) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1639, in full_dispatch_request rv = self.dispatch_request() File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1625, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/views.py", line 84, in view return self.dispatch_request(*args, **kwargs) File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/utils.py", line 235, in dispatch_request return method(*args, **kwargs) File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py", line 331, in wrap return f(*args, **kwargs) File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py", line 1446, in update data[k] = json.loads(v, encoding='utf-8') File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/simplejson/__init__.py", line 533, in loads return cls(encoding=encoding, **kw).decode(s) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/simplejson/decoder.py", line 370, in decode obj, end = self.raw_decode(s) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/simplejson/decoder.py", line 395, in raw_decode ord0 = ord(s[idx]) KeyError: 0 -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers