Re: [pgadmin-hackers] Import from CSV

2008-11-26 Thread Guillaume Lelarge
Quan Zongliang a écrit :
> [...]
> Next, I plan to code TODO Item "- Import from CSV".
> Maybe, export function is also expected by somebody.
> 

That's a really good idea, something I wanted to work on. Glad to see
you'll do it :)

Being able to use different formats (both for import and export) would
be great too.


-- 
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] Import from CSV

2008-11-26 Thread Dave Page
On Wed, Nov 26, 2008 at 7:02 AM, Quan Zongliang <[EMAIL PROTECTED]> wrote:
> Hi, all
>
> Next, I plan to code TODO Item "- Import from CSV".

Cool :-)

> Maybe, export function is also expected by somebody.

As you note, we already have that. The TODO item for importing is just
to produce a *relatively simple* companion to frmExport.

> It will take a long time, several months. Because I have to do it in
> spare time. And I am unfamiliar at i18n, first attempt.

No problem - that'll give you a year or more until the next major release.

> Now, there is frmExport class, it used by query tool to export data.
> So, it seems better named frmImportData to distinct them, rather than
> frmImport.

No, I think frmImport - as I mentioned above, this TODO is intended to
work with frmExport.

> It should be flexible to parse more format as possible.
>
> In future, the TODO item:
> - Data Import/Export tool, for file & external database IO. Including
> data transformation.
> will can share some component with this.

Well that's actually intended as a much more generic ETL tool which
would have a very different architecture (which I have also put a fair
bit of thought into FWIW - I should probably write that down
someplace!). That would be a much more complex standalone project,
though I'd be happy if you wanted to work on it.

> I noticed the pgimport project (http://pgfoundry.org/projects/pgimport/)
> had been registered in 2006. But did nothing.
> We will make it available.

:-)

-- 
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] Are there plans to display memory usage: pg_buffercache

2008-11-26 Thread Jean-Michel Pouré
Dear Friends,

Hello everyone. Nice to talk to you again.

Just out of interest, I would like to know if there are plans to display
PostgreSQL 8.3+ memory usage in pgAdmin to help optimize memory size and
indexes. There is an interesting contrib module called pg_buffercache
that could be usefull if integrated in a nice display. Maybe this would
help pg_buffercache reach PostgreSQL core.

If someone is interested in picking up this contrib module, I can help
for the necessary queries.

Kind regards,
Jean-Michel


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] Are there plans to display memory usage: pg_buffercache

2008-11-26 Thread Dave Page
Hi Jean-Michel, hope you are well.

On Wed, Nov 26, 2008 at 3:19 PM, Jean-Michel Pouré <[EMAIL PROTECTED]> wrote:
> Dear Friends,
>
> Hello everyone. Nice to talk to you again.
>
> Just out of interest, I would like to know if there are plans to display
> PostgreSQL 8.3+ memory usage in pgAdmin to help optimize memory size and
> indexes. There is an interesting contrib module called pg_buffercache
> that could be usefull if integrated in a nice display. Maybe this would
> help pg_buffercache reach PostgreSQL core.

There are no current plans that I know of.

> If someone is interested in picking up this contrib module, I can help
> for the necessary queries.

Well I think we'd be happy to accept patches for this, but we're all
pretty busy at the moment, so I doubt any of us will have time to do
the work for this release :-(

Can we coax you back into some pgAdmin hacking? I know it's been a few
years, but it's like riding a bike - you never forget how :-)

-- 
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] Are there plans to display memory usage: pg_buffercache

2008-11-26 Thread Hiroshi Saito

Hi.

I'm sorry that correspondence interruption becomes long. 
However, my work is saved without discussion


- Original Message - 
From: "Dave Page" <[EMAIL PROTECTED]>


Hi Jean-Michel, hope you are well.


Yeah, me too.!


Well I think we'd be happy to accept patches for this, but we're all
pretty busy at the moment, so I doubt any of us will have time to do
the work for this release :-(


Ahh, the next release has many features.  probably, there is hard work. 



Can we coax you back into some pgAdmin hacking? I know it's been a few
years, but it's like riding a bike - you never forget how :-)


pgAdmin team is a great project. !! 
Then, I do not forget a friend.


Regards,
Hiroshi Saito

--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] Are there plans to display memory usage: pg_buffercache

2008-11-26 Thread Jean-Michel Pouré
On Wed, 2008-11-26 at 16:14 +, Dave Page wrote:
> Can we coax you back into some pgAdmin hacking? I know it's been a few
> years, but it's like riding a bike - you never forget how :-)

Dear Dave,

I hope you are doing well.

It is nice to be back. I will be reading the mailing list
and may well decide to hack a few things. Never say never ...

Kind regards,
Jean-Michel


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] CSV import / export

2008-11-26 Thread Robins Tharakan
Hi,

While looking at the PgAdmin ToDo list, I saw CSV import as one of the
things to do. I just wanted to ask a few things before starting work on it,
so as to ensure that it's envisioned in the way I plan to work on it.


   - Apart from CSV import, are we planning to add an 'export' to CSV via
   the Backup dialog box ? (We could add a 'CSV radio button' under 'Format'
   and change the radio buttons below to things like 'Include headers, column
   separators, etc...). But importantly, since its not mentioned in the ToDo,
   is an export to CSV (of a single table) even on the cards ? Frankly I ask
   this also because currently the only way to export a table in CSV is to do a
   'SELECT * FROM table' in SQL query box and save to file, which is quite
   lengthy a process.
   - I read a bit about wxWidgets and didn't see any relevant libraries
   there. Are there any 'obvious' libraries (in wxWidgets or otherwise) that I
   should use to parse csv into an array ? For e.g. PHP has a pretty neat
   function like fgetcsv ... that converts a csv file to an array of arrays.
   Anything similar to that, or should I have to make that myself ?
   - I have outlined a few details of Import to CSV, please feel free to
   change (or completely rewrite :) the way it should work. I'll try and
   attempt this if no one else is working on it right now.


Import to CSV:

   1. 'Restore' option when one right-clicks on a table name, should allow
   for importing via CSV. A radio button above the file selection defaults to a
   'Backup' file, but has an extra added option of a 'CSV file' along with it.
   2. (While importing from a CSV file) A set of preferences that could
   allow a user to alter CSV import preferences. For e.g. column-separator,
   line-separators, 'include headers' etc.. (Personally I'd prefer defaults to
   these to be modifyable, but File-Options-Preferences is too generic for
   these settings. Any better place for such options ?)
   3. During import, if an error occurs, A dialogue box is thrown that
   provides for three options. Either mute successive errors if any, keep
   showing them, or altogether stop the import.

That's all that I could muster with.
Any feedback on the above would be appreciated.

Thanks
*Robins Tharakan
*


Re: [pgadmin-hackers] CSV import / export

2008-11-26 Thread Quan Zongliang
Hi, Tharakan

This item is already in my plan.
I am thinking what function should be supported and got some idea.

There are some commercial pruduct that coded in Java.
Through the JDBC technology, they can support almost all database.
We can reference their function to design our component.

Import/Export should has themselves dialog. In future, they can be
grouped into a sub-menu with Backup/Restore.

The CSV(Comma-Separated Values) has itself standard "RFC 4180".
Website: http://www.ietf.org/rfc/rfc4180.txt

I plan to support it and some expansion.
  --column delimiter can be comma(std), colon, semicolon or TAB;
(Text parser should accept any char or string to be delimiter, ideally.
However, this will make the function too complicated. Juest be an idea
now.)
  --text can be quoted in single or double(std) quotation;
  --multi-format date, time, numberic
  --user can adjust column order to correspond with CSV item.
  --and so on

wxWidgets has some class that support charset convertion.


---
Quan Zongliang
[EMAIL PROTECTED]
CIT Japan:  http://www.cit.co.jp
CIT China:  http://www.citbj.com.cn


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers