Re: [BUGS] BUG #2604: Bug's

2006-09-02 Thread T.J. Ferraro
This has to be the most insightful and well thought out bug report I've 
ever read.


Maykon wrote:

The following bug has been logged online:

Bug reference:  2604
Logged by:  Maykon
Email address:  [EMAIL PROTECTED]
PostgreSQL version: --
Operating system:   win & linux
Description:Bug's
Details: 


All mirrors are with problem practically!


Thanks..

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

   http://www.postgresql.org/docs/faq

  




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

  http://www.postgresql.org/docs/faq


Re: [BUGS] truncate in combination with deferred triggers

2006-09-02 Thread Bruce Momjian

Is this a TODO or is it going to be fixed for 8.2?

---

Tom Lane wrote:
> Stephan Szabo <[EMAIL PROTECTED]> writes:
> > Yeah, I think there are a few possibilities around truncate inside a
> > savepoint that's rolledback that we have to be careful of.
> 
> Yuck :-(
> 
> > If we could mark the entries in some way so we knew whether or not they
> > were made obsolete by a truncate of our own tranasaction or a committed or
> > rolled back past subtransaction of ours, we could probably make both of
> > these work nicely.
> 
> That seems much more trouble than it's worth, unless someone can
> convince me that this isn't a corner case with little real-world value.
> 
> Furthermore, this still doesn't address the worry about whether there
> are cases where dropping the trigger calls would be inappropriate.
> 
> I propose just having TRUNCATE check for pending triggers on the
> target tables, and throw an error if there are any.
> 
>   regards, tom lane
> 
> ---(end of broadcast)---
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>choose an index scan if your joining column's datatypes do not
>match

-- 
  Bruce Momjian   [EMAIL PROTECTED]
  EnterpriseDBhttp://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

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


Re: [BUGS] BUG #2599: AM/PM doesn't work in to_timestamp in

2006-09-02 Thread Bruce Momjian
Josh Tolley wrote:
> 
> The following bug has been logged online:
> 
> Bug reference:  2599
> Logged by:  Josh Tolley
> Email address:  [EMAIL PROTECTED]
> PostgreSQL version: 8.1.4
> Operating system:   Fedora Core 5
> Description:AM/PM doesn't work in to_timestamp in the middle of a
> string
> Details: 
> 
> eggyknap=# select to_timestamp('30 Aug 06:01:03.223 PM 2006', 'DD Mon
> HH:MI:SS.MS AM '), to_timestamp('30 Aug 2006 06:01:03.223 PM', 'DD Mon
>  HH:MI:SS.MS AM');
>to_timestamp|to_timestamp
> ---+
>  0001-08-30 18:01:03-08 BC | 2006-08-30 18:01:03.223-06
> 
> This appears to happen when AM/PM isn't the last element in the string.

Nice report.  The attached patch fixes it, and will be in 8.2.  I am not
backpatching because someone might be relying on this behavior.

-- 
  Bruce Momjian   [EMAIL PROTECTED]
  EnterpriseDBhttp://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +
Index: src/backend/tcop/pquery.c
===
RCS file: /cvsroot/pgsql/src/backend/tcop/pquery.c,v
retrieving revision 1.108
diff -c -c -r1.108 pquery.c
*** src/backend/tcop/pquery.c	2 Sep 2006 18:17:17 -	1.108
--- src/backend/tcop/pquery.c	3 Sep 2006 01:13:20 -
***
*** 1347,1353 
   * we are.	In any case, we arrange to fetch the target row
   * going forwards.
   */
! if (portal->posOverflow || portal->portalPos == LLONG_MAX ||
  	count - 1 <= portal->portalPos / 2)
  {
  	DoPortalRewind(portal);
--- 1347,1353 
   * we are.	In any case, we arrange to fetch the target row
   * going forwards.
   */
! if (portal->posOverflow || portal->portalPos == FETCH_ALL ||
  	count - 1 <= portal->portalPos / 2)
  {
  	DoPortalRewind(portal);
Index: src/include/nodes/parsenodes.h
===
RCS file: /cvsroot/pgsql/src/include/nodes/parsenodes.h,v
retrieving revision 1.327
diff -c -c -r1.327 parsenodes.h
*** src/include/nodes/parsenodes.h	2 Sep 2006 18:17:17 -	1.327
--- src/include/nodes/parsenodes.h	3 Sep 2006 01:13:22 -
***
*** 14,19 
--- 14,21 
  #ifndef PARSENODES_H
  #define PARSENODES_H
  
+ #include "limits.h"
+ 
  #include "nodes/primnodes.h"
  #include "nodes/value.h"
  
***
*** 1439,1445 
--- 1441,1452 
  	FETCH_RELATIVE
  } FetchDirection;
  
+ #ifdef HAVE_INT64
  #define FETCH_ALL	LLONG_MAX
+ #else
+ #define FETCH_ALL	LONG_MAX
+ #endif
+ 
  
  typedef struct FetchStmt
  {

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

   http://www.postgresql.org/docs/faq


Re: [BUGS] BUG #2600: dblink compile with SSL missing

2006-09-02 Thread Bruce Momjian

Where are we on this?

---

Tom Lane wrote:
> Peter Eisentraut <[EMAIL PROTECTED]> writes:
> > Am Mittwoch, 30. August 2006 22:57 schrieb Chris Browne:
> >> I also seem to recall, in past discussions about "library matters,"
> >> that AIX is more sticky about requiring that libraries be named
> >> expressly.
> 
> > ecpglib has
> 
> > SHLIB_LINK = -L../pgtypeslib -lpgtypes $(libpq) \
> > $(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt -lm, $(LIBS)) 
> > $(PTHREAD_LIBS)
> 
> > ifeq ($(PORTNAME), win32)
> > # Link to shfolder.dll instead of shell32.dll
> > SHLIB_LINK += -lshfolder
> > endif
> 
> > Presumably the same would be necessary everywhere else libpq is used.
> 
> Surely it'd be better to put that into the $(libpq) macro instead.
> I see that Makefile.global already has an AIX-specific hack to deal with
> PTHREAD_LIBS that way, maybe we need to extend it?
> 
> Also, the list of potential library dependencies in libpq's own Makefile
> is quite a bit longer than this list ... perhaps ecpg's list is too
> short?
> 
>   regards, tom lane
> 
> ---(end of broadcast)---
> TIP 3: Have you checked our extensive FAQ?
> 
>http://www.postgresql.org/docs/faq

-- 
  Bruce Momjian   [EMAIL PROTECTED]
  EnterpriseDBhttp://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

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

   http://www.postgresql.org/docs/faq


Re: [BUGS] BUG #2599: AM/PM doesn't work in to_timestamp in

2006-09-02 Thread Bruce Momjian
bruce wrote:
> Josh Tolley wrote:
> > 
> > The following bug has been logged online:
> > 
> > Bug reference:  2599
> > Logged by:  Josh Tolley
> > Email address:  [EMAIL PROTECTED]
> > PostgreSQL version: 8.1.4
> > Operating system:   Fedora Core 5
> > Description:AM/PM doesn't work in to_timestamp in the middle of a
> > string
> > Details: 
> > 
> > eggyknap=# select to_timestamp('30 Aug 06:01:03.223 PM 2006', 'DD Mon
> > HH:MI:SS.MS AM '), to_timestamp('30 Aug 2006 06:01:03.223 PM', 'DD Mon
> >  HH:MI:SS.MS AM');
> >to_timestamp|to_timestamp
> > ---+
> >  0001-08-30 18:01:03-08 BC | 2006-08-30 18:01:03.223-06
> > 
> > This appears to happen when AM/PM isn't the last element in the string.
> 
> Nice report.  The attached patch fixes it, and will be in 8.2.  I am not
> backpatching because someone might be relying on this behavior.

Sorry, I attached the wrong patch to the email.  This is the right one.

-- 
  Bruce Momjian   [EMAIL PROTECTED]
  EnterpriseDBhttp://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +
Index: src/backend/utils/adt/formatting.c
===
RCS file: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v
retrieving revision 1.110
retrieving revision 1.111
diff -c -r1.110 -r1.111
*** src/backend/utils/adt/formatting.c	19 Apr 2006 18:49:09 -	1.110
--- src/backend/utils/adt/formatting.c	3 Sep 2006 01:22:56 -	1.111
***
*** 1762,1768 
  	tmfc->am = TRUE;
  else
  	AMPM_ERROR;
! return strlen(p_inout);
  			}
  			break;
  		case DCH_AM:
--- 1762,1768 
  	tmfc->am = TRUE;
  else
  	AMPM_ERROR;
! return strlen(P_M_STR);
  			}
  			break;
  		case DCH_AM:
***
*** 1781,1787 
  	tmfc->am = TRUE;
  else
  	AMPM_ERROR;
! return strlen(p_inout);
  			}
  			break;
  		case DCH_a_m:
--- 1781,1787 
  	tmfc->am = TRUE;
  else
  	AMPM_ERROR;
! return strlen(PM_STR);
  			}
  			break;
  		case DCH_a_m:
***
*** 1800,1806 
  	tmfc->am = TRUE;
  else
  	AMPM_ERROR;
! return strlen(p_inout);
  			}
  			break;
  		case DCH_am:
--- 1800,1806 
  	tmfc->am = TRUE;
  else
  	AMPM_ERROR;
! return strlen(p_m_STR);
  			}
  			break;
  		case DCH_am:
***
*** 1819,1825 
  	tmfc->am = TRUE;
  else
  	AMPM_ERROR;
! return strlen(p_inout);
  			}
  			break;
  		case DCH_HH:
--- 1819,1825 
  	tmfc->am = TRUE;
  else
  	AMPM_ERROR;
! return strlen(pm_STR);
  			}
  			break;
  		case DCH_HH:

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