This mail will describe "import function" with some pictures.
1. Entry (table context menu):
2. Source type:
These items will be certer of wizard, don't worry about this now.
The third option "Database". It is unnecessary and will be removed.
Beacause the end users can do it with db-link.
The ODBC option will be enabled only when wxWidgets is compiled with wxUSE_ODBC=1.
Maybe some users need more kinds of source. This is the reason why separate
them from others options.
Yesterday, I thought import from archieve file (tar gz zip ...) may needed.
The users often get a compressed file when there are large data.
3. Text file:
There are about 39 encoding.
Delimiter can be multi-wchars.
Width delimiter separeted by comma, like "10,15,,23" (empty means 0).
Quote by single or double quotation.
The option "Set NULL on empty text" will be extends to other types.
On empty text:
Boolean : false
Char : NULL
and so forth
New options will be added:
Boolean true : (yes,y,1,on)
Boolean false: (no, n,0,off)
The "Ignore formats" Option will try to insert data into DB without any change.
New option "format style" will be added, user can select a style, ANSI C, PostgreSQL, RFC-822.
If users would like to use COPY to insert into DB, them have to select a non-pgsql style.
The target table's column info.
The users can select source column for every table column and set its format.
In my plan, there is a new col "option", user can control act when empty value incurred.
(That be set in Option page will be default here.)
If the user decide to insert data with INSERT, then "Expression" col can be used to set
a single PostgreSQL expression, like "Column #1 || Columns #12".
Grid in bottom is a preview.
Destination can be "create INSERT statments into file", "create COPY statments into file",
"Import into database with INSERT", "Import into database with COPY", and so on.
And more log option. (Save to log file, Only log error/warn.)
This is my plan about import from text file.
Most of code is not completed.
You are welcome to give me any suggestions.
It looks too complicated. Can I implement it? ( o.O )
CIT Japan: http://www.cit.co.jp
CIT China: http://www.citbj.com.cn
pgadmin-hackers by date
|Next:||From: Magnus Hagander||Date: 2009-01-21 12:39:38|
|Subject: Re: Patch for pgScript|
|Previous:||From: Dave Page||Date: 2009-01-21 09:59:33|
|Subject: Re: Server Status window work|