Re: problem calling psql from another program

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: Frank Rittinger <gis(at)schnegg(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: problem calling psql from another program
Date: 2005-06-24 14:45:15
Message-ID: 1119624315.8208.70.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 2005-06-24 at 01:57, Frank Rittinger wrote:
> Hello list,
>
> I have PostgreSQL 8.0 on Windows Server 2000, and wrote a small .NET
> program that creates a subprocess that executes psql with a sql script
> as input (psql -U user -f script.sql).
>
> This script runs well if I start psql from the command line and execute
> it there. But within the .NET program it behaves strange: it never
> finishes but the server doesn't do anything. When I kill the program
> with CTRL-C than it seams as if the script gets executed. (BTW this
> works fine under WinXP Pro!)

I'm guessing you have an authentication problem. Make sure you're got
logging turned on for postgresql, then tail the logs (or whatever the
equivalent is in windowsland) and watch for errors when you run your
.net app.

But why are you using the .net connector for postgresql?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Omachonu Ogali 2005-06-24 15:05:32 create rule ... as on insert
Previous Message Martijn van Oosterhout 2005-06-24 14:39:28 Re: Non-unique index performance