From: | Guillaume Lelarge <guillaume(at)lelarge(dot)info> |
---|---|
To: | Quan Zongliang <quanzongliang(at)gmail(dot)com> |
Cc: | Dave Page <dpage(at)pgadmin(dot)org>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org> |
Subject: | Re: import: source code is pushed to git repository |
Date: | 2010-01-09 11:45:04 |
Message-ID: | 4B486C40.9010400@lelarge.info |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
Le 04/01/2010 10:18, Dave Page a écrit :
> On Mon, Jan 4, 2010 at 4:03 AM, Quan Zongliang <quanzongliang(at)gmail(dot)com> wrote:
>>> If you don't have a Linux box, I'd suggest grabbing a copy of
>>> VirtualBox for Windows, and installing Ubuntu or Fedora in it.
>>
>> It can work now. CSV ZIP and TAR files can be imported.
>
> Cool - I'll give it a try as soon as I can. I'm away next week, and
> catching up/preparing this week though, so it may not be for a little
> while.
>
> I'd encourage others to give Quan's code a try.
>
I tried it. I fixed a few warnings I got with gcc. I fixed also the
installation of frmImport.xrc. The patch is attached.
Unfortunately, I didn't fix all warnings. Here are the ones still there:
./frm/frmImport.cpp: In member function ‘void
frmImport::OnArchFilePathKillFocus(wxFocusEvent&)’:
./frm/frmImport.cpp:841: warning: taking address of temporary
./frm/frmImport.cpp: In member function ‘void frmImport::ImportData()’:
./frm/frmImport.cpp:1458: warning: unused variable ‘logwarn’
./frm/frmImport.cpp: In member function ‘void frmImport::GenColsPreview()’:
./frm/frmImport.cpp:3779: warning: unused variable ‘skipemptyline’
./frm/frmImport.cpp:3421: warning: unused variable ‘errcount’
./frm/frmImport.cpp: In member function ‘bool
frmImport::GenCSVSQLData(wxString&, wxString&, wxString**, size_t,
wxDateTime&, int, int)’:
./frm/frmImport.cpp:4199: warning: unused variable ‘pvgridrowidx’
./frm/frmImport.cpp: In member function ‘void
frmImport::ResetColSettingSrcColEditor(bool)’:
./frm/frmImport.cpp:5516: warning: unused variable ‘firstish’
./frm/frmImport.cpp: In member function ‘frmImport::exprSnippet*
frmImport::ParseImportExpr(const wxString&)’:
./frm/frmImport.cpp:6826: warning: unused variable ‘incoldef’
The vast majority are unused variables. Probably because of a WIP. The
only one that really bugs me is:
./frm/frmImport.cpp:841: warning: taking address of temporary
I don't see how to fix this. Certainly because I don't understand the
warning :/
With all my fixes, I'm able to launch the frmImport window. I load a csv
file. When I click Next, it crashes. See the screenshots attached. I
don't know why yet. I also attached the csv file, as it could be the
culprit. FYI, here is the table definition:
CREATE TABLE fbb_bans
(
id serial NOT NULL,
username character varying(200),
ip character varying(255),
email character varying(50),
message character varying(255),
expire integer,
CONSTRAINT fbb_bans_pkey PRIMARY KEY (id)
)
Any idea on what could be wrong? and what about this strange warning
message?
--
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com
Attachment | Content-Type | Size |
---|---|---|
import.patch | text/x-patch | 11.6 KB |
image/png | 18.6 KB | |
image/png | 26.8 KB | |
import_3.png | image/png | 108.5 KB |
fbb_bans.csv | text/csv | 108 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Guillaume Lelarge | 2010-01-10 15:48:42 | Restore window review |
Previous Message | Guillaume Lelarge | 2010-01-07 22:41:01 | Ticket 38: timespin badly displayed on GTK |