[BUGS] Important typo fix for hba.c in 7.4

2003-03-15 Thread Bruno Wolff III
A typo in src/backend/libpq/hba.c breaks local ident authentication
in the SO_PEERCRED case. elif is misspelled as elsif for the test.
A patch is attached.
*** hba.c   Sat Mar 15 10:15:46 2003
--- hba.c.old   Sat Mar 15 10:15:29 2003
***
*** 1248,1254 
  
return true;
  
! #elif defined(SO_PEERCRED)
/* Linux style: use getsockopt(SO_PEERCRED) */
struct ucred peercred;
ACCEPT_TYPE_ARG3 so_len = sizeof(peercred);
--- 1248,1254 
  
return true;
  
! #elsif defined(SO_PEERCRED)
/* Linux style: use getsockopt(SO_PEERCRED) */
struct ucred peercred;
ACCEPT_TYPE_ARG3 so_len = sizeof(peercred);

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


Re: [BUGS] Important typo fix for hba.c in 7.4

2003-03-15 Thread Tom Lane
Bruno Wolff III <[EMAIL PROTECTED]> writes:
> [ #elsif should be #elif ]

Yuck.  I wonder why gcc doesn't complain about this sort of thing?

regards, tom lane

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


[BUGS] Bug #910: query with inherits

2003-03-15 Thread pgsql-bugs
Igor ([EMAIL PROTECTED]) reports a bug with a severity of 4
The lower the number the more severe it is.

Short Description
query with inherits

Long Description
In the next situation:
   CREATE TABLE main (f1 int4 NOT NULL, PRIMARY KEY(f1));
   CREATE TABLE derived (f2 int4) INHERIT (main);
   CREATE TABLE other (f3 int4, f1 int1 NOT NULL);
expression
   explain analyze SELECT * FROM main WHERE f1=1;
executed by index scan main and derived,
but expression
   explain analyze SELECT * FROM main m, other o WHERE o.f3=1 AND o.f1=m.f1;
executed by seq scan main and derived. Why?

   Best regard with Russia!

Sample Code


No file was uploaded with this report


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


[BUGS] PostgreSQL Home page: User Survey returning errors

2003-03-15 Thread Glen Mazza
Answering the User Survey question on the PostgreSQL
http://www.postgreSQL.org home page ("lang use most
with PostgreSQL?") is returning this result on the web
page, prior to showing the results of the poll:

-

Warning: pg_exec() [function.pg-exec]: Query failed:
ERROR: survey_lock: Permission denied. . in
/usr/local/www/www.postgresql.org/survey.php on line
97

Warning: pg_result(): supplied argument is not a valid
PostgreSQL result resource in
/usr/local/www/www.postgresql.org/survey.php on line
98

Warning: pg_exec() [function.pg-exec]: Query failed:
ERROR: survey_lock: Permission denied. . in
/usr/local/www/www.postgresql.org/survey.php on line
106

---

(Would also recommend putting in an ORDER BY clause to
order the results by language popularity.)

Thanks,
Glen

__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

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

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


Re: [BUGS] Important typo fix for hba.c in 7.4

2003-03-15 Thread Bruce Momjian

Patch applied.  Thanks.

---


Bruno Wolff III wrote:
> A typo in src/backend/libpq/hba.c breaks local ident authentication
> in the SO_PEERCRED case. elif is misspelled as elsif for the test.
> A patch is attached.

[ Attachment, skipping... ]

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

-- 
  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: [BUGS] Important typo fix for hba.c in 7.4

2003-03-15 Thread Bruce Momjian
Tom Lane wrote:
> Bruno Wolff III <[EMAIL PROTECTED]> writes:
> > [ #elsif should be #elif ]
> 
> Yuck.  I wonder why gcc doesn't complain about this sort of thing?

I don't think gcc every sees it.  I think cpp should complain, but cpp
skips right over it because it is not in a block of code it has to worry
about.  In this example:

#ifdef SDF
#asdfasf
#endif
#lkjasdf

the first one doesn't generate a warning, while the second does.

This code got in there as part of the OpenBSD support for local ident,
either from the patch or my sloppy fingers.

-- 
  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 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]