Re: public schema not prefixed / copy + paste adds newline

From: Erwin Brandstetter <brsaweda(at)gmail(dot)com>
To: pgadmin-support(at)postgresql(dot)org
Subject: Re: public schema not prefixed / copy + paste adds newline
Date: 2007-07-22 15:30:41
Message-ID: 1185118241.729973.164690@57g2000hsv.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Sorry, I was in the process of editing my post, when the
groups.google.com decided to interpret "<tab><tab> -" as my will to
send it. So the posting above is quite unfinished. $%&/( interface! :
(
Anyway, here is what my finished posting would look like:

On Jul 19, 4:53 pm, dp(dot)(dot)(dot)(at)postgresql(dot)org (Dave Page) wrote:
> Kieran McCusker wrote:
(...)
> > Copy and paste from edit grid adds a newline
> > ===========================
>
> > If you double click on a text field in the grid and do ctrl-c then paste
> > the result into another text field you get a newline on the end. My
> > users do this all the time and I am constantly writing triggers to
> > prevent this from happening.
>
> Unfortunately this happens in the cases when the underlying control as
> supplied by the OS handles the paste. I can reproduce it in Windows XP,
> but it's a Microsoft control that's adding the \n :-(

We have been discussing this before. I think there is a
misunderstanding involved. The newline is not appended at paste time,
it is appended in the text field in the edit grid BEFORE copying.
You can de-select the appended non-printing character in the text
field in the edit grid before copying, which results in the desired
behaviour.
You can even exclusively select the culprit character and
.. paste it in a text field in the edit grid. Results in a newline.
.. cannot paste it in fields of other type in the edit grid (like
timestamp). But then again, you cannot enter \n in a timestamp field
at all. (You can however enter \r, which results in gibberish
character.)
.. cannot paste it in the scratch pad or the SQL query dialogue.
Results in nothing.
.. can paste it in other applications like OOo. Results in a line
break (\r\n). If you copy that one back to a text field in the edit
grid you get two new lines.

I am not sure which character is appended to the text in text fields
in the edit grid, but it should not be there. I suspect confusion in
the handling of \n, \r and \r\n.

Regards
Erwin

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Raymond O'Donnell 2007-07-22 16:23:35 Re: recover data
Previous Message Erwin Brandstetter 2007-07-22 14:45:44 Re: public schema not prefixed / copy + paste adds newline