Re: [HACKERS] persistant psql feature suggestion

2003-06-29 Thread PeterKorman
On Sun, Jun 29, 2003 at 05:24:18PM -0400, Andrew Dunstan wrote: > > - Original Message - > From: "PeterKorman" <[EMAIL PROTECTED]> > > > > I like your solution. But I think I'd code it: > > > > my $psqlpid = open(OUTPIPE,"|-") || die qq(cant fork: $!); > > > > Won't that cause the chi

Re: [HACKERS] persistant psql feature suggestion

2003-06-29 Thread PeterKorman
On Sun, Jun 29, 2003 at 02:15:26PM -0400, Andrew Dunstan wrote: > We don't need to read and write on the same fd. > > The real right way is to detect when the psql client exits - possible when > the perl program spawns it, like shown below. > > As always, TIMTOWTDI > > andrew > > --

Re: [HACKERS] persistant psql feature suggestion

2003-06-29 Thread Andrew Dunstan
; To: "Andrew Dunstan" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, June 29, 2003 11:40 AM Subject: Re: [HACKERS] persistant psql feature suggestion > On Sun, Jun 29, 2003 at 10:22:49AM -0400, Andrew Dunstan wrote: > > OK, worked out the wrinkle. psql is

Re: [HACKERS] persistant psql feature suggestion

2003-06-29 Thread PeterKorman
On Sun, Jun 29, 2003 at 10:22:49AM -0400, Andrew Dunstan wrote: > OK, worked out the wrinkle. psql is behaving perfectly well, but the shim > doesn't get a SIGPIPE until it tries to write to it after psql has exited. > > A slightly hackish fix for this would be to put this line after the "print >

Re: [HACKERS] persistant psql feature suggestion

2003-06-29 Thread Andrew Dunstan
{ > print STDERR "usage: ",$0," fifofile\n"; > exit 1; > } > > - Original Message - > From: "Matthew T. O'Connor" <[EMAIL PROTECTED]> > To: "James Pye" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]>

Re: [HACKERS] persistant psql feature suggestion

2003-06-28 Thread Andrew Dunstan
lt;[EMAIL PROTECTED]> Sent: Friday, June 27, 2003 1:44 PM Subject: Re: [HACKERS] persistant psql feature suggestion > On Fri, 2003-06-27 at 03:21, James Pye wrote: > > Greets, > > > > Just a thought for a psql enhancement, afiak, it is not easily possible for persistent conne

Re: [HACKERS] persistant psql feature suggestion

2003-06-27 Thread Matthew T. O'Connor
On Fri, 2003-06-27 at 03:21, James Pye wrote: > Greets, > > Just a thought for a psql enhancement, afiak, it is not easily possible for > persistent connections to a database in a shell script.. > The ability for psql to remain in the background reading from stdin and > writing to st

[HACKERS] persistant psql feature suggestion

2003-06-27 Thread James Pye
Greets, Just a thought for a psql enhancement, afiak, it is not easily possible for persistent connections to a database in a shell script.. The ability for psql to remain in the background reading from stdin and writing to stdout until explicitly killed. More specifically, so a