Good point Tom.
I failed to go little deeper in the problem.
So the final test for me is that the whole bash script along
with its echos is to be globally directed to the pipes.
On Friday 02 March 2007 19:43 Tom Lane wrote:
> Martijn van Oosterhout writes:
> > I don't think you can acheive the
Martijn van Oosterhout writes:
> I don't think you can acheive the effect you want with a FIFO.
I think Doug had it right: the trick is to have some process holding the
FIFO open for write throughout the procedure, so that the reader (psql)
doesn't see an EOF. This doesn't necessarily have to be
On Fri, Mar 02, 2007 at 05:26:03PM +0100, Vincenzo Romano wrote:
> > psql gets an EOF on the named pipe when the first shell command
> > exits. You need to batch all your commands and send them in one shell
> > command, so it keeps the pipe open until it's done.
> >
> > -Doug
>
> Using "echo -n"
On Friday 02 March 2007 17:07 Douglas McNaught wrote:
> Vincenzo Romano <[EMAIL PROTECTED]> writes:
> > Hi all.
> >
> > Under Linux I'm trying to communicate to an instance of the psql client
> > running in the background through a couple of named pipes.
> > I'd like to do something like this:
> >
Vincenzo Romano <[EMAIL PROTECTED]> writes:
> Hi all.
>
> Under Linux I'm trying to communicate to an instance of the psql client
> running in the background through a couple of named pipes.
> I'd like to do something like this:
>
> $ mkfifo /tmp/pg_ipipe /tmp/pg_opipe
> $ psql -d testdb -U testus
Hi all.
Under Linux I'm trying to communicate to an instance of the psql client
running in the background through a couple of named pipes.
I'd like to do something like this:
$ mkfifo /tmp/pg_ipipe /tmp/pg_opipe
$ psql -d testdb -U testuser < /tmp/pg_ipipe > /tmp/pg_opipe &
...
$ echo "\t" > /tmp