Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aJbbv-0008RS-9w for pgadmin-hackers@arkaria.postgresql.org; Thu, 14 Jan 2016 06:42:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aJbbu-0002Rm-NV for pgadmin-hackers@arkaria.postgresql.org; Thu, 14 Jan 2016 06:42:18 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aJbbg-0002D4-MX for pgadmin-hackers@postgresql.org; Thu, 14 Jan 2016 06:42:04 +0000 Received: from mail-qk0-x231.google.com ([2607:f8b0:400d:c09::231]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aJbbZ-0000jh-FV for pgadmin-hackers@postgresql.org; Thu, 14 Jan 2016 06:42:03 +0000 Received: by mail-qk0-x231.google.com with SMTP id x1so1501185qkc.1 for ; Wed, 13 Jan 2016 22:41:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=f3irZMhrjSOlveuoigJrL3uB/KJL/HPDEJx/7tiT15c=; b=eG2f0KOsKmh+IpFLi5r9uIN2E0dfhh0pTnPIMVMySwR6E8chD55dL2lQ9HoGSn0LEF 2TTomBp+tDRgfh3/hWhENTOMToKcV9whQ+zdet4CABkbMGYzkh7XHJHvcTOOAYvFN0bL gJxHP2M77PpKC6lnPsBpqYio+ZCktX9aefXYeJ88lhODMH6YIO7zPh3hCIE8GoO0453+ RhHTH22QXew6ErPGiwTMISMOI0PSX0RhRjIusiGrxgJ+xy/+VFNt3UDZBUrwf4+MpGm3 E6+tG2/d84tOdMzGLugZoALJSxpuqVkAD5WMupm8S5BUh2R2GhYqQkb6xORXU28D7tEG NPxw== 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:date :message-id:subject:from:to:cc:content-type; bh=f3irZMhrjSOlveuoigJrL3uB/KJL/HPDEJx/7tiT15c=; b=InYw80Z1bBKc4UgrqR0r0bICaddsIwAiz8Tbdw3s11WIaMlgL0Ons2UZ8cWpb5Uen4 zEl7wBcgXUZOBq4tBMzYiI4PjOGxQnAEgmajFkzCu+3G30JPYgc4pDdBUAAJdWADtAsq 1MwkyIGqTiQz+mqC/GOVI1M4h/Qp7LmA88u7esirFE0H6Rs3bv7Rt9NO2REhUI2GRhKw +EpQCcZp08Co+Ip+mIluJXZddT28ta68ObeiTMMz/lsNi/Vkhk2vtp4F4/0fIRmEWNmS PFvv8XHlf9vpgnFmW9ubmv4HX8pKs6+vSYZ1Wh1r9BReRLyPf5hJ+k7nLMomEyheXNzc kxmw== X-Gm-Message-State: ALoCoQnWSluhJ1jo6A5o9jigkEvSHt01jDpFy0F707w/IlQcem54CBHT5gDtH3M2PApMrdVXOiV77a2vbd5xUSksok/I4ZZXazUTeLJVW31PKg3BobDL01U= MIME-Version: 1.0 X-Received: by 10.13.213.193 with SMTP id x184mr1942387ywd.339.1452753715637; Wed, 13 Jan 2016 22:41:55 -0800 (PST) Received: by 10.37.202.75 with HTTP; Wed, 13 Jan 2016 22:41:55 -0800 (PST) In-Reply-To: References: Date: Thu, 14 Jan 2016 12:11:55 +0530 Message-ID: Subject: Re: Unable to update Domain properly From: Neel Patel To: Khushboo Vashi Cc: pgadmin-hackers Content-Type: multipart/mixed; boundary=001a114fd4da2afee60529459534 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 --001a114fd4da2afee60529459534 Content-Type: multipart/alternative; boundary=001a114fd4da2afee10529459532 --001a114fd4da2afee10529459532 Content-Type: text/plain; charset=UTF-8 Hi, Please find updated patch file with the fix of below issue. *Issue: -* Earlier patch file will work only when in "public" schema. If we change the schema name then generated name should contain both ""."". Attached patch file will include the schema name along with domain name. Thanks Khushboo for point out the issue. Thanks, Neel Patel On Wed, Jan 13, 2016 at 10:57 PM, Neel Patel wrote: > Hi, > > Please find the attached patch file for fix of above issue. > > *Issue:- * > Below generated SQL was wrong. > > ALTER DOMAIN pem."TestDomain" > RENAME TO "TestDomain1"; > ALTER DOMAIN pem."TestDomain" > DROP NOT NULL; > > In second query, domain name is wrong as domain name was updated by the > first query. > > *Resolution:-* > > Now when any properties got changed along with domain name then correct > SQL will be generated. > Correct query should be as below. > > ALTER DOMAIN pem."TestDomain" > RENAME TO "TestDomain1"; > ALTER DOMAIN pem."TestDomain1" > DROP NOT NULL; > > Please review it and do let us know for any comment. > > Thanks, > Neel Patel > > On Wed, Jan 13, 2016 at 6:43 PM, Khushboo Vashi < > khushboo.vashi@enterprisedb.com> wrote: > >> Hi, >> >> While updating Domain from pgAdmin-III , I observed an error. >> >> When I update only Domain name it is working properly, but when I try to >> update multiple fields, I get an error. >> >> For example, if I try to rename Domain *TestDomain* to *TestDomain1* >> and also modifies one or more fields (except comment). I get below error. >> >> >> ERROR: type "pem.TestDomain" does not exist >> >> *Generated SQL:* >> >> ALTER DOMAIN pem."TestDomain" >> RENAME TO "TestDomain1"; >> ALTER DOMAIN pem."TestDomain" >> DROP NOT NULL; >> >> >> Thanks, >> Khushboo >> > > --001a114fd4da2afee10529459532 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

Please find updated patch file with= the fix of below issue.

Issue: -

Earlier patch file will work only when in "public"= ; schema.=C2=A0
If we change the schema name then generated name = should contain both "<schema_name>"."<domain_name&g= t;".
Attached patch file will include the schema name along = with domain name.

Thanks Khushboo for point out th= e issue.

Thanks,
Neel Patel
<= div class=3D"gmail_extra">
On Wed, Jan 13, 20= 16 at 10:57 PM, Neel Patel <neel.patel@enterprisedb.com><= /span> wrote:
Hi,
Please find the attached patch file for fix of above issue.

Issue:-=C2=A0
Below generated SQL w= as wrong.

ALTER DOMAIN pem."TestDomain"
=C2=A0 RENAME TO "TestDom= ain1";
ALTER DOMAIN pem."TestDomain"
= =C2=A0 DROP NOT NULL;

In second query, domain name is wrong as domain name was upd= ated by the first query.
=
Resolution= :-

Now= when any properties got changed along with domain name then correct SQL wi= ll be generated.
Correct = query should be as below.

AL= TER DOMAIN pem."TestDomain"
= =C2=A0 RENAME TO "TestDomain1";<= /span>
ALTER DOMAIN=C2=A0pem."TestDomain1"
= =C2=A0 DROP NOT NULL;

Please review it and do let us know for any com= ment.

Thanks,
Neel Patel

On W= ed, Jan 13, 2016 at 6:43 PM, Khushboo Vashi <khushboo.vash= i@enterprisedb.com> wrote:
=
Hi,

While updating Domain from pgAd= min-III=C2=A0 , I observed an error.

When I update only D= omain name it is working properly, but when I try to update multiple fields= , I get an error.

For example,=C2=A0 if I try to rename D= omain TestDomain to TestDomain1 and also modifies one or more= fields (except comment). I get below error.


ERROR:= =C2=A0 type "pem.TestDomain" does not exist

Generated S= QL:

ALTER DOMAIN pem."TestDomain"
=C2=A0 RENAME TO = "TestDomain1";
ALTER DOMAIN pem."TestDomain"
=C2= =A0 DROP NOT NULL;


Thanks,
K= hushboo


--001a114fd4da2afee10529459532-- --001a114fd4da2afee60529459534 Content-Type: application/octet-stream; name="domain_fix_V2.patch" Content-Disposition: attachment; filename="domain_fix_V2.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ijdw0ht91 ZGlmZiAtLWdpdCBhL3BnYWRtaW4vZGxnL2RsZ0RvbWFpbi5jcHAgYi9wZ2Fk bWluL2RsZy9kbGdEb21haW4uY3BwCmluZGV4IGEzOTkyZjIuLjljNDBiNDMg MTAwNjQ0Ci0tLSBhL3BnYWRtaW4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nRG9tYWluOjpHZXRTcWwoKQogCQkJCXRtcERlZi5S ZW1vdmVBdChpbmRleCk7CiAJCQllbHNlCiAJCQl7Ci0JCQkJdG1wc3FsICs9 IHd4VCgiQUxURVIgRE9NQUlOICIpICsgZG9tYWluLT5HZXRRdW90ZWRGdWxs SWRlbnRpZmllcigpCisJCQkJdG1wc3FsICs9IHd4VCgiQUxURVIgRE9NQUlO ICIpICsgcXRJZGVudChjYlNjaGVtYS0+R2V0VmFsdWUoKSkgKyB3eFQoIi4i KSArIHF0SWRlbnQobmFtZSkKIAkJCQkgICAgICAgICAgKyAgd3hUKCJcbiAg QUREIik7CiAJCQkJaWYgKCFjb25uYW1lLklzRW1wdHkoKSkKIAkJCQkJdG1w c3FsICs9IHd4VCgiIENPTlNUUkFJTlQgIik7CkBAIC0zMzUsOSArMzM1LDgg QEAgd3hTdHJpbmcgZGxnRG9tYWluOjpHZXRTcWwoKQogCQkJCWRlZmluaXRp b24gPSBkZWZpbml0aW9uLk1pZCgxKS5CZWZvcmVGaXJzdCgnIicpOwogCQkJ ZWxzZQogCQkJCWRlZmluaXRpb24gPSBkZWZpbml0aW9uLkJlZm9yZUZpcnN0 KCcgJyk7Ci0JCQlzcWwgKz0gd3hUKCJBTFRFUiBET01BSU4gIikgKyBkb21h aW4tPkdldFF1b3RlZEZ1bGxJZGVudGlmaWVyKCkKKwkJCXNxbCArPSB3eFQo IkFMVEVSIERPTUFJTiAiKSArIHF0SWRlbnQoY2JTY2hlbWEtPkdldFZhbHVl KCkpICsgd3hUKCIuIikgKyBxdElkZW50KG5hbWUpCiAJCQkgICAgICAgKyB3 eFQoIlxuICBEUk9QIENPTlNUUkFJTlQgIikgKyBxdElkZW50KGRlZmluaXRp b24pICsgd3hUKCI7XG4iKTsKLQogCQl9CiAKIAkJLy8gQWRkIHRoZSBBREQg Q09OU1RSQUlOVHMuLi4K --001a114fd4da2afee60529459534 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers --001a114fd4da2afee60529459534--