Thread: Bug with exceptionally long values.
pgAdmin v1.10.3 Windows XP SP3 PostgreSQL 8.4.4 Any time I do a select that produces a really really long value, instead of showing the value pgAdmin has a blank cell in the output. The value is actually there if I right click and copy, then paste into a text editor, just not displayed. The value in one test case was a string 6.4 million characters long. I would prefer to see something in that cell that indicates there is a value too large to be displayed, as I thought my query was returning a null or empty string at first, when in fact it was returning the correct value and it was just not being displayed. Thanks, Jeff
Sorry one mistake, I copied the value by selecting the cell and using ctrl-c, there is no right-click copy. On Mon, Jul 26, 2010 at 12:36 PM, Jeff Adams <jadams@azavea.com> wrote: > pgAdmin v1.10.3 > Windows XP SP3 > PostgreSQL 8.4.4 > > Any time I do a select that produces a really really long value, > instead of showing the value pgAdmin has a blank cell in the output. > The value is actually there if I right click and copy, then paste into > a text editor, just not displayed. The value in one test case was a > string 6.4 million characters long. > > I would prefer to see something in that cell that indicates there is a > value too large to be displayed, as I thought my query was returning a > null or empty string at first, when in fact it was returning the > correct value and it was just not being displayed. > > Thanks, > Jeff > -- Jeff Adams Azavea (formerly Avencia) | T: 215.701.7717 | F: 215.925.2663 www.azavea.com
On 26 July 2010 17:50, Jeff Adams <jadams@azavea.com> wrote: > Sorry one mistake, I copied the value by selecting the cell and using > ctrl-c, there is no right-click copy. Hi Jeff, Are you sure that the cell doesn't start with an EOL that prevent you from seeing the string without resizing it, or without copying it? Could you possibly produce a test case? -- Regards, Peter Geoghegan
Here's Jeff's test case. I am not immediately able to check it: On 27 July 2010 17:54, Jeff Adams <jadams@azavea.com> wrote: > Piece o' cake: > > select lpad('test', 75, 't') as test75, lpad('test', 750, 't') as test750, > lpad('test', 7500, 't') as test7500, lpad('test', 75000, 't') as test75000, > lpad('test', 10000, 't') as test10000 > > For me, I see "tttttttttttttttttttttt" in the (non-resized) test75, test750, > test7500, and test10000 columns, but the test75000 column has a blank cell. > > Jeff > > -- Regards, Peter Geoghegan
It looks blank, but its contents are actually there. ctrl-a, ctrl-c in the column selects what you''d expect to see.<br />Thebehavior happens a 65536 in the lpad<br /><br />select lpad('test', 65535, 't') -- looks OK<br /> select lpad('test',65536, 't') -- looks empty (but really isn't)<br /><br /><br /><br /><div class="gmail_quote">On Tue, Jul27, 2010 at 12:08 PM, Peter Geoghegan <span dir="ltr"><<a href="mailto:peter.geoghegan86@gmail.com">peter.geoghegan86@gmail.com</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;">Here'sJeff's test case. I am not immediately able to check it:<br /><br /> On 27 July 2010 17:54, Jeff Adams <<ahref="mailto:jadams@azavea.com">jadams@azavea.com</a>> wrote:<br /> > Piece o' cake:<br /> ><br /> > selectlpad('test', 75, 't') as test75, lpad('test', 750, 't') as test750,<br /> > lpad('test', 7500, 't') as test7500,lpad('test', 75000, 't') as test75000,<br /> > lpad('test', 10000, 't') as test10000<br /> ><br /> > Forme, I see "tttttttttttttttttttttt" in the (non-resized) test75, test750,<br /> > test7500, and test10000 columns, butthe test75000 column has a blank cell.<br /> ><br /> > Jeff<br /> ><br /> ><br /><br /><br /> --<br /> Regards,<br/> Peter Geoghegan<br /><font color="#888888"><br /> --<br /> Sent via pgadmin-support mailing list (<a href="mailto:pgadmin-support@postgresql.org">pgadmin-support@postgresql.org</a>)<br/> To make changes to your subscription:<br/><a href="http://www.postgresql.org/mailpref/pgadmin-support" target="_blank">http://www.postgresql.org/mailpref/pgadmin-support</a><br/></font></blockquote></div><br />
Correct, it's the "looking empty" that I'm suggesting is a bug.
--
Jeff Adams
Azavea (formerly Avencia) | T: 215.701.7717 | F: 215.925.2663
www.azavea.com
On Tue, Jul 27, 2010 at 1:27 PM, Michael Shapiro <mshapiro51@gmail.com> wrote:
It looks blank, but its contents are actually there. ctrl-a, ctrl-c in the column selects what you''d expect to see.
The behavior happens a 65536 in the lpad
select lpad('test', 65535, 't') -- looks OK
select lpad('test', 65536, 't') -- looks empty (but really isn't)On Tue, Jul 27, 2010 at 12:08 PM, Peter Geoghegan <peter.geoghegan86@gmail.com> wrote:Here's Jeff's test case. I am not immediately able to check it:
On 27 July 2010 17:54, Jeff Adams <jadams@azavea.com> wrote:
> Piece o' cake:
>
> select lpad('test', 75, 't') as test75, lpad('test', 750, 't') as test750,
> lpad('test', 7500, 't') as test7500, lpad('test', 75000, 't') as test75000,
> lpad('test', 10000, 't') as test10000
>
> For me, I see "tttttttttttttttttttttt" in the (non-resized) test75, test750,
> test7500, and test10000 columns, but the test75000 column has a blank cell.
>
> Jeff
>
>
--
Regards,
Peter Geoghegan
--
Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-support
--
Jeff Adams
Azavea (formerly Avencia) | T: 215.701.7717 | F: 215.925.2663
www.azavea.com
Le 27/07/2010 19:31, Jeff Adams a écrit : > Correct, it's the "looking empty" that I'm suggesting is a bug. > Works for me on Linux. It could be with the wxGrid on specific platforms. Switching to another grid component would be quite a work. -- Guillaumehttp://www.postgresql.frhttp://dalibo.com
I'm attempting to get a wxGrid sample working so I can test it. <br /><br />One option simpler than changing grid componentswould be changing something about the cell (for example, a really ugly option would be changing the backgroundcolor) whenever you set data in excess of 65535 characters on windows...<br /><br /><br /><div class="gmail_quote">OnTue, Jul 27, 2010 at 2:31 PM, 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;"> Le 27/07/2010 19:31, JeffAdams a écrit :<br /><div class="im">> Correct, it's the "looking empty" that I'm suggesting is a bug.<br /> ><br/><br /></div>Works for me on Linux. It could be with the wxGrid on specific<br /> platforms. Switching to anothergrid component would be quite a work.<br /><font color="#888888"><br /><br /> --<br /> Guillaume<br /> <a href="http://www.postgresql.fr"target="_blank">http://www.postgresql.fr</a><br /> <a href="http://dalibo.com" target="_blank">http://dalibo.com</a><br/></font></blockquote></div><br /><br clear="all" /><br />-- <br />Jeff Adams<br/>Azavea (formerly Avencia) | T: 215.701.7717 | F: 215.925.2663<br /><a href="http://www.azavea.com">www.azavea.com</a><br/>
Le 27/07/2010 21:01, Jeff Adams a écrit : > I'm attempting to get a wxGrid sample working so I can test it. > You need to compile wxWidgets code for that. Make sure you get 2.8 branch. We don't support 2.9 right now. > One option simpler than changing grid components would be changing something > about the cell (for example, a really ugly option would be changing the > background color) whenever you set data in excess of 65535 characters on > windows... > Ugly and not really intuitive. But, at least, not buggy. -- Guillaumehttp://www.postgresql.frhttp://dalibo.com
The bug is definitely a wxWidgets bug, and exists both in 2.8.11 and 2.9.1. I was able to reproduce it in their "grid" sample.
I submitted a bug to the wxWidgets project:
http://trac.wxwidgets.org/ticket/12276
Do you think pgAdmin should implement some sort of temporary fix in the meanwhile?
Thanks,
Jeff
I submitted a bug to the wxWidgets project:
http://trac.wxwidgets.org/ticket/12276
Do you think pgAdmin should implement some sort of temporary fix in the meanwhile?
Thanks,
Jeff
On Tue, Jul 27, 2010 at 3:23 PM, Guillaume Lelarge <guillaume@lelarge.info> wrote:
Le 27/07/2010 21:01, Jeff Adams a écrit :> I'm attempting to get a wxGrid sample working so I can test it.You need to compile wxWidgets code for that. Make sure you get 2.8
>
branch. We don't support 2.9 right now.Ugly and not really intuitive. But, at least, not buggy.
> One option simpler than changing grid components would be changing something
> about the cell (for example, a really ugly option would be changing the
> background color) whenever you set data in excess of 65535 characters on
> windows...
>
--
Le 27/07/2010 22:26, Jeff Adams a écrit : > The bug is definitely a wxWidgets bug, and exists both in 2.8.11 and 2.9.1. > I was able to reproduce it in their "grid" sample. > > I submitted a bug to the wxWidgets project: > > http://trac.wxwidgets.org/ticket/12276 > > Do you think pgAdmin should implement some sort of temporary fix in the > meanwhile? > It would be best to have a (even temporary) fix. I'm not sure how we can do that. Having a special background colour could do that. But that means we need to check the length of every cells. I suppose that, if you have cells with more than 50k characters, you'll also have big tables. It sure will take a lot of time to check that. And what should we do if we find cells with more than X thousand characters? Highlight them? Draw something? I don't know. All I can say is that it won't be cheap (performance-wise). -- Guillaumehttp://www.postgresql.frhttp://dalibo.com
The class that I experience the problem with is the ctlSQLGrid, which extends wxGrid. I don't know wxWidgets at all, but in the grid sample class they have an example of setting a cell renderer, perhaps you could add a cell renderer that changes the background color [or even renders a string that says "Sorry, too long!"] based on the strlen? That should have fairly minimal performance impact since it will only affect the N rows being actually rendered, not the entire result set.
The example is /wxWidgets-2.8.11/samples/grid/griddemo.cpp line 299.
Jeff
--
Jeff Adams
Azavea (formerly Avencia) | T: 215.701.7717 | F: 215.925.2663
www.azavea.com
The example is /wxWidgets-2.8.11/samples/grid/griddemo.cpp line 299.
Jeff
On Tue, Jul 27, 2010 at 4:39 PM, Guillaume Lelarge <guillaume@lelarge.info> wrote:
Le 27/07/2010 22:26, Jeff Adams a écrit :> The bug is definitely a wxWidgets bug, and exists both in 2.8.11 and 2.9.1.It would be best to have a (even temporary) fix. I'm not sure how we can
> I was able to reproduce it in their "grid" sample.
>
> I submitted a bug to the wxWidgets project:
>
> http://trac.wxwidgets.org/ticket/12276
>
> Do you think pgAdmin should implement some sort of temporary fix in the
> meanwhile?
>
do that. Having a special background colour could do that. But that
means we need to check the length of every cells. I suppose that, if you
have cells with more than 50k characters, you'll also have big tables.
It sure will take a lot of time to check that. And what should we do if
we find cells with more than X thousand characters? Highlight them? Draw
something? I don't know. All I can say is that it won't be cheap
(performance-wise).
--
--
Jeff Adams
Azavea (formerly Avencia) | T: 215.701.7717 | F: 215.925.2663
www.azavea.com
Le 28/07/2010 13:59, Jeff Adams a écrit : > The class that I experience the problem with is the ctlSQLGrid, which > extends wxGrid. I don't know wxWidgets at all, but in the grid sample class > they have an example of setting a cell renderer, perhaps you could add a > cell renderer that changes the background color [or even renders a string > that says "Sorry, too long!"] based on the strlen? That should have fairly > minimal performance impact since it will only affect the N rows being > actually rendered, not the entire result set. > > The example is /wxWidgets-2.8.11/samples/grid/griddemo.cpp line 299. > Well, I think it would hurt the performance. But, we should check that. And it would be a pretty good way to show a NULL value. -- Guillaumehttp://www.postgresql.frhttp://dalibo.com
I think changing the background but leaving the current value "as is" is better than changing the value. That way you indicatethat the value is there (and can be retrieved with copy/paste) but that you can't show it (and perhaps add a pop-uphint when the mouse is moved over the cell)<br /><br /><div class="gmail_quote">On Wed, Jul 28, 2010 at 8:19 AM, GuillaumeLelarge <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;"> Le 28/07/2010 13:59, Jeff Adams a écrit :<br /> > The class that I experience the problem with isthe ctlSQLGrid, which<br /> > extends wxGrid. I don't know wxWidgets at all, but in the grid sample class<br /> >they have an example of setting a cell renderer, perhaps you could add a<br /> > cell renderer that changes the backgroundcolor [or even renders a string<br /> > that says "Sorry, too long!"] based on the strlen? That should havefairly<br /> > minimal performance impact since it will only affect the N rows being<br /> > actually rendered,not the entire result set.<br /> ><br /> > The example is /wxWidgets-2.8.11/samples/grid/griddemo.cpp line299.<br /> ><br /><br /> Well, I think it would hurt the performance. But, we should check that.<br /> And it wouldbe a pretty good way to show a NULL value.<br /><font color="#888888"><br /><br /> --<br /> Guillaume<br /> <a href="http://www.postgresql.fr"target="_blank">http://www.postgresql.fr</a><br /> <a href="http://dalibo.com" target="_blank">http://dalibo.com</a><br/></font></blockquote></div><br />
Again, I don't know wxWidgets, but usually a custom renderer wouldn't affect copy/paste because it is merely affecting what's drawn to the screen, not the value actually "in" the cell. And right now there isn't anything rendered at all.
On Wed, Jul 28, 2010 at 9:28 AM, Michael Shapiro <mshapiro51@gmail.com> wrote:
On Wed, Jul 28, 2010 at 9:28 AM, Michael Shapiro <mshapiro51@gmail.com> wrote:
I think changing the background but leaving the current value "as is" is better than changing the value. That way you indicate that the value is there (and can be retrieved with copy/paste) but that you can't show it (and perhaps add a pop-up hint when the mouse is moved over the cell)On Wed, Jul 28, 2010 at 8:19 AM, Guillaume Lelarge <guillaume@lelarge.info> wrote:Le 28/07/2010 13:59, Jeff Adams a écrit :
> The class that I experience the problem with is the ctlSQLGrid, which
> extends wxGrid. I don't know wxWidgets at all, but in the grid sample class
> they have an example of setting a cell renderer, perhaps you could add a
> cell renderer that changes the background color [or even renders a string
> that says "Sorry, too long!"] based on the strlen? That should have fairly
> minimal performance impact since it will only affect the N rows being
> actually rendered, not the entire result set.
>
> The example is /wxWidgets-2.8.11/samples/grid/griddemo.cpp line 299.
>
Well, I think it would hurt the performance. But, we should check that.
And it would be a pretty good way to show a NULL value.
--
Guillaume
http://www.postgresql.fr
http://dalibo.com
The wxWidgets bug I filed got changed to "low priority" with the following comment:
"I think for now the best (and simplest) workaround is to not use such long strings in wxGrid"
So unfortunately I wouldn't expect a fix in wxWidgets any time soon.
"I think for now the best (and simplest) workaround is to not use such long strings in wxGrid"
So unfortunately I wouldn't expect a fix in wxWidgets any time soon.
On Wed, Jul 28, 2010 at 9:49 AM, Jeff Adams <jadams@azavea.com> wrote:
Again, I don't know wxWidgets, but usually a custom renderer wouldn't affect copy/paste because it is merely affecting what's drawn to the screen, not the value actually "in" the cell. And right now there isn't anything rendered at all.
On Wed, Jul 28, 2010 at 9:28 AM, Michael Shapiro <mshapiro51@gmail.com> wrote:I think changing the background but leaving the current value "as is" is better than changing the value. That way you indicate that the value is there (and can be retrieved with copy/paste) but that you can't show it (and perhaps add a pop-up hint when the mouse is moved over the cell)On Wed, Jul 28, 2010 at 8:19 AM, Guillaume Lelarge <guillaume@lelarge.info> wrote:Le 28/07/2010 13:59, Jeff Adams a écrit :
> The class that I experience the problem with is the ctlSQLGrid, which
> extends wxGrid. I don't know wxWidgets at all, but in the grid sample class
> they have an example of setting a cell renderer, perhaps you could add a
> cell renderer that changes the background color [or even renders a string
> that says "Sorry, too long!"] based on the strlen? That should have fairly
> minimal performance impact since it will only affect the N rows being
> actually rendered, not the entire result set.
>
> The example is /wxWidgets-2.8.11/samples/grid/griddemo.cpp line 299.
>
Well, I think it would hurt the performance. But, we should check that.
And it would be a pretty good way to show a NULL value.
--
Guillaume
http://www.postgresql.fr
http://dalibo.com
As long as the copy/paste works, you could add a hint (or have a displyed value) that says that
On Wed, Jul 28, 2010 at 8:49 AM, Jeff Adams <jadams@azavea.com> wrote:
Again, I don't know wxWidgets, but usually a custom renderer wouldn't affect copy/paste because it is merely affecting what's drawn to the screen, not the value actually "in" the cell. And right now there isn't anything rendered at all.
On Wed, Jul 28, 2010 at 9:28 AM, Michael Shapiro <mshapiro51@gmail.com> wrote:I think changing the background but leaving the current value "as is" is better than changing the value. That way you indicate that the value is there (and can be retrieved with copy/paste) but that you can't show it (and perhaps add a pop-up hint when the mouse is moved over the cell)On Wed, Jul 28, 2010 at 8:19 AM, Guillaume Lelarge <guillaume@lelarge.info> wrote:Le 28/07/2010 13:59, Jeff Adams a écrit :
> The class that I experience the problem with is the ctlSQLGrid, which
> extends wxGrid. I don't know wxWidgets at all, but in the grid sample class
> they have an example of setting a cell renderer, perhaps you could add a
> cell renderer that changes the background color [or even renders a string
> that says "Sorry, too long!"] based on the strlen? That should have fairly
> minimal performance impact since it will only affect the N rows being
> actually rendered, not the entire result set.
>
> The example is /wxWidgets-2.8.11/samples/grid/griddemo.cpp line 299.
>
Well, I think it would hurt the performance. But, we should check that.
And it would be a pretty good way to show a NULL value.
--
Guillaume
http://www.postgresql.fr
http://dalibo.com