Skip site navigation (1) Skip section navigation (2)

Re: import: source code is pushed to git repository

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: (view raw, whole thread or download thread mbox)
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
./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
./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:

  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


Attachment: import.patch
Description: text/x-patch (11.6 KB)
Attachment: import_1.png
Description: image/png (18.6 KB) (inlined above)
Attachment: import_2.png
Description: image/png (26.8 KB) (inlined above)
Attachment: import_3.png
Description: image/png (108.5 KB)
Attachment: fbb_bans.csv
Description: text/csv (108 bytes)

In response to


pgadmin-hackers by date

Next:From: Guillaume LelargeDate: 2010-01-10 15:48:42
Subject: Restore window review
Previous:From: Guillaume LelargeDate: 2010-01-07 22:41:01
Subject: Ticket 38: timespin badly displayed on GTK

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group