Обсуждение: Unable to update Domain properly

Поиск
Список
Период
Сортировка

Unable to update Domain properly

От
Khushboo Vashi
Дата:
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

Re: Unable to update Domain properly

От
Neel Patel
Дата:
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

Вложения

Re: Unable to update Domain properly

От
Neel Patel
Дата:
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 "<schema_name>"."<domain_name>".
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 <neel.patel@enterprisedb.com> 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


Вложения