Thread: pgAdmin 1.14 bug
Hello,
pgAdmin version: Version 1.14.0 (Sep 12 2011, rev: REL-1_14_0)
OS: Windows XP Pro RUS SP3
PostgreSQL: 9.1.1. (compiled without any options)
bug description:
create a table (creation SQL below), then right click on it, and select 'Properties', then write some comment and click Ok, and you receive an error (see in attachment). Bug is beacasue of long contraint 'ck_pos_documents_1'.
Table creation SQL:
CREATE TABLE pos_documents
(
id bigserial NOT NULL,
entry_type character varying(20) NOT NULL,
CONSTRAINT ck_pos_documents_1 CHECK (entry_type::text = 'Z-report open'::text OR entry_type::text = 'Return'::text OR entry_type::text = 'Inkasso'::text OR entry_type::text = 'Sale'::text OR entry_type::text = 'X-report'::text OR entry_type::text = 'Cash Withdrawal'::text OR entry_type::text = 'Z-report closed'::text OR entry_type::text = 'Open drawer'::text OR entry_type::text = 'Service'::text OR entry_type::text = 'Z-report Z1'::text OR entry_type::text = 'Z-report Z2'::text OR entry_type::text = 'Z-report Z3'::text OR entry_type::text = 'Z-report Z4'::text)
)
WITH (
OIDS=FALSE
);
thank you.
pgAdmin version: Version 1.14.0 (Sep 12 2011, rev: REL-1_14_0)
OS: Windows XP Pro RUS SP3
PostgreSQL: 9.1.1. (compiled without any options)
bug description:
create a table (creation SQL below), then right click on it, and select 'Properties', then write some comment and click Ok, and you receive an error (see in attachment). Bug is beacasue of long contraint 'ck_pos_documents_1'.
Table creation SQL:
CREATE TABLE pos_documents
(
id bigserial NOT NULL,
entry_type character varying(20) NOT NULL,
CONSTRAINT ck_pos_documents_1 CHECK (entry_type::text = 'Z-report open'::text OR entry_type::text = 'Return'::text OR entry_type::text = 'Inkasso'::text OR entry_type::text = 'Sale'::text OR entry_type::text = 'X-report'::text OR entry_type::text = 'Cash Withdrawal'::text OR entry_type::text = 'Z-report closed'::text OR entry_type::text = 'Open drawer'::text OR entry_type::text = 'Service'::text OR entry_type::text = 'Z-report Z1'::text OR entry_type::text = 'Z-report Z2'::text OR entry_type::text = 'Z-report Z3'::text OR entry_type::text = 'Z-report Z4'::text)
)
WITH (
OIDS=FALSE
);
thank you.
Attachment
Hi On Thu, Dec 8, 2011 at 3:37 PM, Vjacheslav Vjacheslav <eferalgan@gmail.com> wrote: > Hello, > > pgAdmin version: Version 1.14.0 (Sep 12 2011, rev: REL-1_14_0) > OS: Windows XP Pro RUS SP3 > PostgreSQL: 9.1.1. (compiled without any options) > > bug description: > create a table (creation SQL below), then right click on it, and select > 'Properties', then write some comment and click Ok, and you receive an error > (see in attachment). Bug is beacasue of long contraint 'ck_pos_documents_1'. > > Table creation SQL: It works fine for me. Can anyone else reproduce the issue? -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
On 2011.12.08 12:37, Dave Page wrote: > Hi > > On Thu, Dec 8, 2011 at 3:37 PM, Vjacheslav Vjacheslav > <eferalgan@gmail.com> wrote: >> Hello, >> >> pgAdmin version: Version 1.14.0 (Sep 12 2011, rev: REL-1_14_0) >> OS: Windows XP Pro RUS SP3 >> PostgreSQL: 9.1.1. (compiled without any options) >> >> bug description: >> create a table (creation SQL below), then right click on it, and select >> 'Properties', then write some comment and click Ok, and you receive an error >> (see in attachment). Bug is beacasue of long contraint 'ck_pos_documents_1'. >> >> Table creation SQL: > It works fine for me. Can anyone else reproduce the issue? > I can confirm the problem. WinXP SP3, pgAdmin 1.14.0, PostgreSQL 8.3.4 on i686-pc-linux-gnu, compiled by GCC gcc (Gentoo 4.3.2-r3 p1.6, pie-10.1.5) 4.3.2 What I noticed is the check constraint is beeing updated even if nothing was done to it. I only added a comment ant thats the SQL that was generated: ALTER TABLE pos_documents DROP CONSTRAINT ck_pos_documents_1; ALTER TABLE pos_documents ADD CONSTRAINT ck_pos_documents_1 CHECK entry_type::text = 'Z-report open'::text OR entry_type::text = 'Return'::text OR entry_type::text = 'Inkasso'::text OR entry_type::text = 'Sale'::text OR entry_type::text = 'X-report'::text OR entry_type::text = 'Cash Withdrawal'::text OR entry_type::text = 'Z-report closed'::text OR entry_type::text = 'Open drawer'::text OR entry_type::text = 'Service'::text OR entry_type::text = 'Z-report Z1'::text OR entry_type::text = 'Z-report Z2'::text OR entry_type::text = 'Z-report Z3'::text OR entry_type::text = '; COMMENT ON TABLE pos_documents IS 'test'; You can see that the constraint text got truncated and left quotes open. -- Julius Tuskenis Head of the programming department UAB nSoft mob. +37068233050
On Thu, 2011-12-08 at 13:09 +0200, Julius Tuskenis wrote: > On 2011.12.08 12:37, Dave Page wrote: > > Hi > > > > On Thu, Dec 8, 2011 at 3:37 PM, Vjacheslav Vjacheslav > > <eferalgan@gmail.com> wrote: > >> Hello, > >> > >> pgAdmin version: Version 1.14.0 (Sep 12 2011, rev: REL-1_14_0) > >> OS: Windows XP Pro RUS SP3 > >> PostgreSQL: 9.1.1. (compiled without any options) > >> > >> bug description: > >> create a table (creation SQL below), then right click on it, and select > >> 'Properties', then write some comment and click Ok, and you receive an error > >> (see in attachment). Bug is beacasue of long contraint 'ck_pos_documents_1'. > >> > >> Table creation SQL: > > It works fine for me. Can anyone else reproduce the issue? > > > I can confirm the problem. > > WinXP SP3, pgAdmin 1.14.0, PostgreSQL 8.3.4 on i686-pc-linux-gnu, > compiled by GCC gcc (Gentoo 4.3.2-r3 p1.6, pie-10.1.5) 4.3.2 > > What I noticed is the check constraint is beeing updated even if nothing > was done to it. I only added a comment ant thats the SQL that was generated: > > ALTER TABLE pos_documents DROP CONSTRAINT ck_pos_documents_1; > ALTER TABLE pos_documents ADD CONSTRAINT ck_pos_documents_1 CHECK > entry_type::text = 'Z-report open'::text OR entry_type::text = > 'Return'::text OR entry_type::text = 'Inkasso'::text OR entry_type::text > = 'Sale'::text OR entry_type::text = 'X-report'::text OR > entry_type::text = 'Cash Withdrawal'::text OR entry_type::text = > 'Z-report closed'::text OR entry_type::text = 'Open drawer'::text OR > entry_type::text = 'Service'::text OR entry_type::text = 'Z-report > Z1'::text OR entry_type::text = 'Z-report Z2'::text OR entry_type::text > = 'Z-report Z3'::text OR entry_type::text = '; > COMMENT ON TABLE pos_documents > IS 'test'; > > You can see that the constraint text got truncated and left quotes open. > Works fine for me. Dave also. I guess we both use 1.14.1, and you both use 1.14.0. Update to 1.14.1 might fix your issue. Actually, that reminds me that we, once again, forgot to spread the news... will do. -- Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com
On 2011.12.08 23:50, Guillaume Lelarge wrote: >> I can confirm the problem. >> >> WinXP SP3, pgAdmin 1.14.0, PostgreSQL 8.3.4 on i686-pc-linux-gnu, >> compiled by GCC gcc (Gentoo 4.3.2-r3 p1.6, pie-10.1.5) 4.3.2 >> >> What I noticed is the check constraint is beeing updated even if nothing >> was done to it. I only added a comment ant thats the SQL that was generated: >> >> ALTER TABLE pos_documents DROP CONSTRAINT ck_pos_documents_1; >> ALTER TABLE pos_documents ADD CONSTRAINT ck_pos_documents_1 CHECK >> entry_type::text = 'Z-report open'::text OR entry_type::text = >> 'Return'::text OR entry_type::text = 'Inkasso'::text OR entry_type::text >> = 'Sale'::text OR entry_type::text = 'X-report'::text OR >> entry_type::text = 'Cash Withdrawal'::text OR entry_type::text = >> 'Z-report closed'::text OR entry_type::text = 'Open drawer'::text OR >> entry_type::text = 'Service'::text OR entry_type::text = 'Z-report >> Z1'::text OR entry_type::text = 'Z-report Z2'::text OR entry_type::text >> = 'Z-report Z3'::text OR entry_type::text = '; >> COMMENT ON TABLE pos_documents >> IS 'test'; >> >> You can see that the constraint text got truncated and left quotes open. >> > Works fine for me. Dave also. I guess we both use 1.14.1, and you both > use 1.14.0. Update to 1.14.1 might fix your issue. Updated the pgAdmin to 1.14.1 yet the error is the same... Nothing has changed concerning the issue - I still get the SQL I have sent before when editing the comment. I think the problem. I have checked and there is no problem with short check rules. You can see, from the SQL I have sent that the constraint text is truncated to 512 char (when counting from "entry_type"). That could indicate a problem in table properties dialog window.... > > Actually, that reminds me that we, once again, forgot to spread the > news... will do. > Thank You. -- Julius Tuskenis Head of the programming department UAB nSoft mob. +37068233050
<div class="gmail_quote">On Fri, Dec 9, 2011 at 1:50 AM, Guillaume Lelarge <span dir="ltr"><<a href="mailto:guillaume@lelarge.info">guillaume@lelarge.info</a>></span>wrote:<br /><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="HOEnZb"><divclass="h5">On Thu, 2011-12-08 at 13:09 +0200, Julius Tuskenis wrote:<br /> > On 2011.12.08 12:37, DavePage wrote:<br /> > > Hi<br /> > ><br /> > > On Thu, Dec 8, 2011 at 3:37 PM, Vjacheslav Vjacheslav<br/> > > <<a href="mailto:eferalgan@gmail.com">eferalgan@gmail.com</a>> wrote:<br /> > >>Hello,<br /> > >><br /> > >> pgAdmin version: Version 1.14.0 (Sep 12 2011, rev: REL-1_14_0)<br/> > >> OS: Windows XP Pro RUS SP3<br /> > >> PostgreSQL: 9.1.1. (compiled without any options)<br/> > >><br /> > >> bug description:<br /> > >> create a table (creation SQL below),then right click on it, and select<br /> > >> 'Properties', then write some comment and click Ok, and youreceive an error<br /> > >> (see in attachment). Bug is beacasue of long contraint 'ck_pos_documents_1'.<br />> >><br /> > >> Table creation SQL:<br /> > > It works fine for me. Can anyone else reproduce theissue?<br /> > ><br /> > I can confirm the problem.<br /> ><br /> > WinXP SP3, pgAdmin 1.14.0, PostgreSQL8.3.4 on i686-pc-linux-gnu,<br /> > compiled by GCC gcc (Gentoo 4.3.2-r3 p1.6, pie-10.1.5) 4.3.2<br /> ><br/> > What I noticed is the check constraint is beeing updated even if nothing<br /> > was done to it. I onlyadded a comment ant thats the SQL that was generated:<br /> ><br /> > ALTER TABLE pos_documents DROP CONSTRAINTck_pos_documents_1;<br /> > ALTER TABLE pos_documents ADD CONSTRAINT ck_pos_documents_1 CHECK<br /> > entry_type::text= 'Z-report open'::text OR entry_type::text =<br /> > 'Return'::text OR entry_type::text = 'Inkasso'::textOR entry_type::text<br /> > = 'Sale'::text OR entry_type::text = 'X-report'::text OR<br /> > entry_type::text= 'Cash Withdrawal'::text OR entry_type::text =<br /> > 'Z-report closed'::text OR entry_type::text ='Open drawer'::text OR<br /> > entry_type::text = 'Service'::text OR entry_type::text = 'Z-report<br /> > Z1'::textOR entry_type::text = 'Z-report Z2'::text OR entry_type::text<br /> > = 'Z-report Z3'::text OR entry_type::text= ';<br /> > COMMENT ON TABLE pos_documents<br /> > IS 'test';<br /> ><br /> > You can seethat the constraint text got truncated and left quotes open.<br /> ><br /><br /></div></div>Works fine for me. Davealso. I guess we both use 1.14.1, and you both<br /> use 1.14.0. Update to 1.14.1 might fix your issue.<br /><br /> Actually,that reminds me that we, once again, forgot to spread the<br /> news... will do.<br /><span class="HOEnZb"><fontcolor="#888888"></font></span></blockquote><font color="#888888"><br /></font>I've updated pgadmin toversion 1.4.1 (using upgrade.bat), but the problem the same.<br /></div>
On Fri, 2011-12-09 at 09:42 +0200, Julius Tuskenis wrote: > On 2011.12.08 23:50, Guillaume Lelarge wrote: > >> I can confirm the problem. > >> > >> WinXP SP3, pgAdmin 1.14.0, PostgreSQL 8.3.4 on i686-pc-linux-gnu, > >> compiled by GCC gcc (Gentoo 4.3.2-r3 p1.6, pie-10.1.5) 4.3.2 > >> > >> What I noticed is the check constraint is beeing updated even if nothing > >> was done to it. I only added a comment ant thats the SQL that was generated: > >> > >> ALTER TABLE pos_documents DROP CONSTRAINT ck_pos_documents_1; > >> ALTER TABLE pos_documents ADD CONSTRAINT ck_pos_documents_1 CHECK > >> entry_type::text = 'Z-report open'::text OR entry_type::text = > >> 'Return'::text OR entry_type::text = 'Inkasso'::text OR entry_type::text > >> = 'Sale'::text OR entry_type::text = 'X-report'::text OR > >> entry_type::text = 'Cash Withdrawal'::text OR entry_type::text = > >> 'Z-report closed'::text OR entry_type::text = 'Open drawer'::text OR > >> entry_type::text = 'Service'::text OR entry_type::text = 'Z-report > >> Z1'::text OR entry_type::text = 'Z-report Z2'::text OR entry_type::text > >> = 'Z-report Z3'::text OR entry_type::text = '; > >> COMMENT ON TABLE pos_documents > >> IS 'test'; > >> > >> You can see that the constraint text got truncated and left quotes open. > >> > > Works fine for me. Dave also. I guess we both use 1.14.1, and you both > > use 1.14.0. Update to 1.14.1 might fix your issue. > Updated the pgAdmin to 1.14.1 yet the error is the same... Nothing has > changed concerning the issue - I still get the SQL I have sent before > when editing the comment. I think the problem. > > I have checked and there is no problem with short check rules. You can > see, from the SQL I have sent that the constraint text is truncated to > 512 char (when counting from "entry_type"). That could indicate a > problem in table properties dialog window.... We don't set length of strings, so I don't see why a truncate would happen. It could be a platform issue. I'll try on Windows (I checked on Linux, and I suppose Dave checked on Mac OS X, but you both are using Windows). -- Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com
On Fri, 2011-12-09 at 09:41 +0100, Guillaume Lelarge wrote: > On Fri, 2011-12-09 at 09:42 +0200, Julius Tuskenis wrote: > > On 2011.12.08 23:50, Guillaume Lelarge wrote: > > >> I can confirm the problem. > > >> > > >> WinXP SP3, pgAdmin 1.14.0, PostgreSQL 8.3.4 on i686-pc-linux-gnu, > > >> compiled by GCC gcc (Gentoo 4.3.2-r3 p1.6, pie-10.1.5) 4.3.2 > > >> > > >> What I noticed is the check constraint is beeing updated even if nothing > > >> was done to it. I only added a comment ant thats the SQL that was generated: > > >> > > >> ALTER TABLE pos_documents DROP CONSTRAINT ck_pos_documents_1; > > >> ALTER TABLE pos_documents ADD CONSTRAINT ck_pos_documents_1 CHECK > > >> entry_type::text = 'Z-report open'::text OR entry_type::text = > > >> 'Return'::text OR entry_type::text = 'Inkasso'::text OR entry_type::text > > >> = 'Sale'::text OR entry_type::text = 'X-report'::text OR > > >> entry_type::text = 'Cash Withdrawal'::text OR entry_type::text = > > >> 'Z-report closed'::text OR entry_type::text = 'Open drawer'::text OR > > >> entry_type::text = 'Service'::text OR entry_type::text = 'Z-report > > >> Z1'::text OR entry_type::text = 'Z-report Z2'::text OR entry_type::text > > >> = 'Z-report Z3'::text OR entry_type::text = '; > > >> COMMENT ON TABLE pos_documents > > >> IS 'test'; > > >> > > >> You can see that the constraint text got truncated and left quotes open. > > >> > > > Works fine for me. Dave also. I guess we both use 1.14.1, and you both > > > use 1.14.0. Update to 1.14.1 might fix your issue. > > Updated the pgAdmin to 1.14.1 yet the error is the same... Nothing has > > changed concerning the issue - I still get the SQL I have sent before > > when editing the comment. I think the problem. > > > > I have checked and there is no problem with short check rules. You can > > see, from the SQL I have sent that the constraint text is truncated to > > 512 char (when counting from "entry_type"). That could indicate a > > problem in table properties dialog window.... > > We don't set length of strings, so I don't see why a truncate would > happen. It could be a platform issue. I'll try on Windows (I checked on > Linux, and I suppose Dave checked on Mac OS X, but you both are using > Windows). > It seems wxListCtrl's cells have a limit on the number of characters on Windows. It's 512, as Julius rightly guessed. I've fixed the issue for the constraints list control, but I guess we need to review our use of that control. Sighhh. Anyway, this fix will be available with pgAdmin 1.14.2. -- Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com