Re: Postgresql Development Options

From: Ray Madigan <raymond(dot)madigan(at)gmail(dot)com>
To:
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Postgresql Development Options
Date: 2015-04-07 19:52:41
Message-ID: CAEKowXBXS0uMdxGdStQo3uZdkh97u5e3sXgHDGsHsjfBscw=Lw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Apr 5, 2015 at 6:46 PM, Steve Atkins <steve(at)blighty(dot)com> wrote:

>
> On Apr 5, 2015, at 1:21 PM, Ray Madigan <raymond(dot)madigan(at)gmail(dot)com> wrote:
>
> > I have been using postgresql in java off and on for many years. I now
> have an assignemtn where I have to build a very straight forward networked
> application that needs to be able to insert Array data types from a windows
> environment to a remote Linux Postgresql database.
> >
> > My first attempt was to use Qt. Their is a postgresql driver and found
> out the hard way that it doesn't support the Array data type. I need a
> small ui so the user can set options for the application. My question is,
> are there other UI options that I can use to development this application.
>
> The Qt database driver is not great for general use. Where it shines is
> when you want to do simple CRUD queries and to have them connected to
> widgets with minimal work. It should support arrays, though, with a little
> data transformation.
>
> If you're looking to use C++ then Qt is an excellent framework for a GUI
> app - one that you won't beat for cross-platform work - but you might
> consider whether using libpqxx or libpq to connect to the database might
> suit your needs better.
>
> Cheers,
> Steve
>

I tried to use libpq this morning and all it can do is crash. I have
Postgresql running on my local machine and have installed the ODBC drivers,
not that that matters at this point. I can't seem to get past the call to
connect to the database.:

my code looks like:

PGconn * connection;

char conninfo[250];

sprintf(conninfo, "user=%s password=%s dbname=%s hostaddr=%s
port=%d", "user", "password", "foo", "192.168.3.3", 5433);

qDebug() << "Foo1: " << conninfo;

connection = PQconnectdb( conninfo );

qDebug() << "Foo1: ";

And I get

The program has unexpectedly finished.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jim Nasby 2015-04-07 21:04:20 Problems with casting
Previous Message Gerardo Herzig 2015-04-07 16:59:46 Re: check data for datatype