Re: [PATCHES] SIGPIPE handling, take two.

2003-11-11 Thread Gaetano Mendola
Gaetano Mendola wrote:

Bruce Momjian wrote:

I think this is the patch I like.  It does the auto-detect handling as I
hoped.  I will just do the doc updates to mention it.
My only issue is that this is per-connection, while I think you have to
create a global variable that defaults to false, and on first connect,
check, and not after.  Based on the code below, a second connection
would  have the SIGPIPE signal set to SIG_IGN, not SIG_DEF, and you
would be back to setting SIG_IGN around each send, even though it was
already set.
Are others OK with this too?


I believe that the are some errors on the following code:

#if !defined(HAVE_POSIX_SIGNALS)
 {
 pqsigfunc old;
  old = signal(SIGPIPE, SIG_IGN);
 if (old != SIG_DFL)
 conn-do_sigaction = false;
 signal(SIGPIPE, old);
 }
#else
{
 struct sigaction oact;
 if (sigaction(SIGPIPE, NULL, oact) == 0  oact.sa_handler != 
SIG_DFL)
 conn-do_sigaction = false;
 }
#endif   /* !HAVE_POSIX_SIGNALS */

the old signal handler is not reinstated in case of
HAVE_POSIX_SIGNAL
Forget the message :-)

Gaetano







---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
 joining column's datatypes do not match


[PATCHES] cancel 3FB0C0CE.6050007@bigfoot.com

2003-11-11 Thread mendola
This message was cancelled from within Mozilla.


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])


Re: [PATCHES] SIGPIPE handling, take two.

2003-11-11 Thread Manfred Spraul
Tom Lane wrote:

I don't think we need to complicate pqsignal's API for this.  Instead
we'd better document that SIGPIPE handling has to be set up and kept
stable before doing any libpq operations in a multithread app.
 

Not reliable.
An app could install it's own signal handler and block SIGPIPE around 
all libpq calls. Signal blocking is per-thread. But the SIG_IGN/restore 
sequence affects the whole app - PQconnectdb calls would result in 
randomly dropped SIGPIPE signals.

--
   Manfred
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
  http://www.postgresql.org/docs/faqs/FAQ.html


Re: [PATCHES] [HACKERS] Proposal: psql force prompting on notty

2003-11-11 Thread Michael Mauger
You can send it to me to test.  I've duplicated the reported behavior
here so I can test the fix.  (Ideally, send me a url to downloaded it
from rather than attaching it.)

Just a thought, a corresponding option of --batch/-B could be added to do
the opposite of the --interactive/-I option.  Having options to override
dynamically detected configuration is not all that uncommon.

Thanks.

-- Michael

PS. Beware of the first patch I sent -- it had a bug in the string sent
to getopt.  It had an option M rather than I.  The second patch was
corrected.

--- Bruce Momjian [EMAIL PROTECTED] wrote:
 
 This is an unusual one.  The OS isn't handling things properly, and we
 have to work around that.  Can you get a Win32 user to test psql with
 this patch to make sure it actually fixes the problem and behaves as
 expected?  If you want me to produce a psql binary, I can do that.
 
 Thanks.
 

---
 
 Michael Mauger wrote:
  I'm the maintainer of sql.el in GNU Emacs.  On both the Mac OS X 
  and the Windows/Cygwin platform we've had reports that psql run 
  under Emacs does not issue a prompt for commands.  
  
  I did a little research and it appears that the cause is that 
  pset.notty is being set to false because stdin/stdout are not 
  a tty (pgsql-server/src/bin/psql/startup.c).  I'd like to 
  propose that an option be added to the psql command line to 
  override the detection of the tty and force the prompting for 
  commands on stdin.  
  
  I believe the attached patch should add the option -I to psql 
  and force the prompt to appear as if it were an interactive 
  session regardless of the state of stdin/stdout.  I do not 
  have a configuration available to properly test this however.
  
  Please be sure to include me in any replies since I do not 
  subscribe to this list.  TIA.
  



__
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [PATCHES] psql: \dg and groups for \du

2003-11-11 Thread Bruce Momjian

I will write the psql.sgml changes.

Your patch has been added to the PostgreSQL unapplied patches list at:

http://momjian.postgresql.org/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---


Markus Bertheau wrote:
 Hi,
 
 attached is a patch that adds display of the groups a user belongs to to
 \du and a \dg command to psql. It's against 7.4beta5.
 
 -- 
 Markus Bertheau [EMAIL PROTECTED]

[ Attachment, skipping... ]

 
 ---(end of broadcast)---
 TIP 6: Have you searched our list archives?
 
http://archives.postgresql.org

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html


Re: [PATCHES] Two very minor win32 patches

2003-11-11 Thread Bruce Momjian
Bruce Momjian wrote:
 Claudio Natoli wrote:
  For src/backend/postmaster/postmaster.c and src/include/c.h
  (Note: should ioctlsocket_ret be initialized to 1 for BEOS too, and can it
  take an unsigned parameter? If so, could simplify.)
 
 OK, I have updated this for 7.4 and CVS.  Any idea why it has to be
 initialized to 1 and not 0?

Never mind --- I figured it out:

FIONBIO
The argp parameter is a pointer to an unsigned long value. Set argp
to a nonzero value if the nonblocking mode should be enabled, or zero if
the nonblocking mode should be disabled. When a socket is created, it
operates in blocking mode by default (nonblocking mode is disabled).
This is consistent with BSD sockets.

argp value  Nonblocking mode

0   Disabled
nonzero Enabled

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/ioctlsocket_2.asp

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [PATCHES] Win32 patch for Makefile.shlib

2003-11-11 Thread Bruce Momjian

Your patch has been added to the PostgreSQL unapplied patches list at:

http://momjian.postgresql.org/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---


Claudio Natoli wrote:
 
 If this is acceptable, I'll send a similar one for src/backend/Makefile
 
 Cheers,
 Claudio
 
 
 --- 
 WE HAVE MOVED - PLEASE NOTE OUR NEW CONTACT DETAILS: 
 THE BASEMENT, 33 EWELL STREET, BALMAIN NSW 2041 
 TEL: +61 2 9555 1544 FAX: +61 2 9555 6911 
 Certain disclaimers and policies apply to all email sent from Memetrics.
 For the full text of these disclaimers and policies see 
 http://www.memetrics.com/emailpolicy.html
   
 

[ Attachment, skipping... ]

 
 ---(end of broadcast)---
 TIP 7: don't forget to increase your free space map settings

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])


Re: [PATCHES] Win32 patch for Makefile.shlib

2003-11-11 Thread Claudio Natoli


 Of course, this only applied to head, no 7.4.

Yes, that's correct. (strictly, at the time of creation, I was working off
the WIN32_DEV branch...)

--- 
Certain disclaimers and policies apply to all email sent from Memetrics.
For the full text of these disclaimers and policies see 
a
href=http://www.memetrics.com/emailpolicy.html;http://www.memetrics.com/em
ailpolicy.html/a

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [PATCHES] Win32 patch for Makefile.shlib

2003-11-11 Thread Bruce Momjian
Claudio Natoli wrote:
 
 
  Of course, this only applied to head, no 7.4.
 
 Yes, that's correct. (strictly, at the time of creation, I was working off
 the WIN32_DEV branch...)

OK.  You said you had some backend/Makefile stuff too.  Please check CVS
head first because I dealt with ln -s and some missing $(X) already.

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html


Re: [PATCHES] Small Doc Patch

2003-11-11 Thread Bruce Momjian

Patch applied to HEAD and 7.4CVS.  Thanks.

---


Stephan Szabo wrote:
 Here's a patch that adds some text mentioning that
 RESTRICT is not deferrable to the create table reference
 page.

Content-Description: 

[ Attachment, skipping... ]

 
 ---(end of broadcast)---
 TIP 6: Have you searched our list archives?
 
http://archives.postgresql.org

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])


Re: [PATCHES] ALTER TABLE modifications

2003-11-11 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes:
 Is this to be applied to CVS HEAD?

It sounded like large portions were still at the request-for-comment
stage...

regards, tom lane

---(end of broadcast)---
TIP 8: explain analyze is your friend