Re: Paste rows rough patch

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Edward Di Geronimo Jr(dot)" <edigeronimo(at)xtracards(dot)com>, <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Paste rows rough patch
Date: 2006-05-02 07:33:22
Message-ID: E7F85A1B5FF8D44C8A1AF6885BC9A0E4011CA04F@ratbert.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

> -----Original Message-----
> From: pgadmin-hackers-owner(at)postgresql(dot)org
> [mailto:pgadmin-hackers-owner(at)postgresql(dot)org] On Behalf Of
> Edward Di Geronimo Jr.
> Sent: 02 May 2006 06:26
> To: pgadmin-hackers(at)postgresql(dot)org
> Subject: [pgadmin-hackers] Paste rows rough patch
>
> Attached is a rough patch to allow pasting of rows into the
> edit grid.
> It's not intended to be a final solution, but rather enough
> to start some discussion.
>
> This patch is rather simple - it always deliminates columns
> by tabs, and stops if it hits a new line. It pastes data
> starting at the first column of the row the cursor is on.
> Right now it doesn't pay any attention to the column details,
> so it will gladly insert data into serial columns or whatever.
>
> I figure the proper solution should probably be to obey the
> copy settings for deliminating columns.

Yes - in particular the quote settings - I have lots of data containing
newlines for example, which this won't work with for obvious reasons.

> As to things like serial & oid columns, how does everyone
> feel about that? Maybe we could add an option to paste values
> in, skip the columns, or prompt?

OID columns should be ignored, but serial columns should be optional
imho - just a simple 'The data you are pasting include values that will
be inserted into a serial column. Do you want to skip the serial valules
and allow new ones to be assigned? Y/N' prompt at paste time.

Regards, Dave

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2006-05-02 07:34:05 Re: Bug#364787: pgadmin3: pressing delete key on selected rows doesn't
Previous Message Dave Page 2006-05-02 07:27:54 Re: OSX build of pgadmin 1.4 still broken