Re: [PATCHES] patch to add krb_server_hostname to postgresql.conf

2005-06-14 Thread Bruce Momjian

Second patch applied:

Add GUC krb_server_hostname so the server hostname can be specified as
part of service principal.  If not set, any service principal matching
an entry in the keytab can be used.

I updated your documentation to reflect this.

Thanks.

---

Todd Kover wrote:
   Todd Kover [EMAIL PROTECTED] writes:
  
The attached patch adds a directive to the config file,
krb_server_hostname that allows the hostname that service tickets
are obtained against to be different from the hostname of the db
server.
  
   Why is this necessary?
 
 It's largely useful in combination with restricting the interfaces
 listened to via the listen_addresses directive in the config file.  As
 the code works now you can only connect via kerberos with a service
 principal derived from the hostname of the box rather than any dns name
 associated with any of the box's interfaces.
 
 For example, if the server is named server0.example.com, but the db is
 bound to db.example.com via the listen_addresses directive, the pgsql
 server won't authenticate properly.
 
 Similarly, if server0.example.com is one interface and
 server1.example.com is another, and the hostname is server.example.com
 but doesn't correspond to any interfaces, connecting to neither will
 work.
 
   If it is necessary, wouldn't something similar be needed at the
   client end as well?
 
 No.  The decision of which principal to obtain a service ticket for is
 based on what it connects to.
 
 In the first above example, if running:
 
   psql -h server0.example.com
 
 the client would obtain a service ticket for
 postgres/server0.example.com.  If running:
 
   psql -h db.example.com
 
 it would obtain a service ticket for postgres/db.example.com, and
 without the directive I'm adding, it would fail to establish a
 connection because the server wouldn't be expecting that.  Of course,
 adding the directive would make the first case fail and the second
 pass.  This works fine for our environment since we're binding to
 db.example.com.
 
 (as an aside, it's actually a bit more complicated then this since the
 way the kerberos libraries are used, db.example.com is canonicalized, so
 if it were a CNAME for server0.example.com it would do the right thing,
 but we're using an A record).
 
   I'd have thought that host information would be established by some
   sort of system-wide configuration file, not by per-program options.
 
 Different applications can use different service principals.  The use
 of the hostname in the principal name at all is an application-specific
 decision.  The krb5 api encourages it to be a DNS hostname pretty
 strongly in the way it works, but it's not cast in stone.
 
 However, other kerberos clients will accept using any kerberos principal
 in the keytab but postgresql as shipped requires it to match the
 hostname.  If you want that behavior instead, then change pg_krb5_server
 to NULL when calling krb5_recvauth in src/backend/libpq/auth.c and it
 won't require that the hostnames match. (but it's still necessary for
 something to match).
 
 The second patch (kovert-krb5-patch-newbehavior.txt) makes the default
 behavior to accept any principal in the keytab.  This means that people
 using kerberos will continue to work, but they'll be slightly more broad
 in what they accept as a valid service principal (I suspect there's very
 few people in the world who care about this since it still needs to be
 something in the keytab).
 
 I left the implementation of krb_server_hostname so that someone can
 define this if they want. (and if they want to make it behave like
 versions of pgsql up until now, they'd need to set it to the hostname).
 
 The second patch's default case makes pgsql match the behavior of
 eklogind (kerberized rlogind that ships with MIT kerberos) and the
 gssapi/krb5-aware version of sshd and probably numerous other things.
 
   Also, the available documentation says that PG_KRB_SRVNAM is a
   service name, not a host name, so I feel like there's something wrong
   with your description of what you're doing.
 
 indeed, there was something wrong with what I was doing.  PG_KRB_SRVNAM
 defaults to 'postgres' rather than the hostname.  This was fallout from
 when I was first developing the patch.
 
 The absence of the krb_server_hostname config flag should have left the
 default behavior in place, it wasn't.  I just tested this patch against
 both cases on a dev box and it works as expected.
 
 both patches are against 8.0.0rc3.  The first implements what I
 originally was doing without changing the default, the second changes
 the default to be more accepting and also implements the directive in
 case someone wants to go back to the old behavior.
 
 -Todd
 

 Index: doc/src/sgml/runtime.sgml
 ===
 RCS file: 

Re: [PATCHES] SHOW ALL with descriptions

2005-06-14 Thread Bruce Momjian
Matthias Schmidt wrote:
 Hi *,
 
 here's a tiny patch showing the description of the backend parameters 
 alongside the 'SHOW ALL' Command.
 I'm not quite shure wether this should be the default output or not. 
 Probably this needs to be configurable itself.
 
 What do you think?

Good question.  psql \dT shows descriptions, but \df does not, only
\df+, so that doesn't give us a pattern.

We could add a VERBOSE option to SHOW ALL to show descriptions, but that
seems like overkill.

I have applied your patch that show descriptions for SHOW ALL, but not
for SHOW varname.  That seems like the cleanest solution.  I also
updated the documentation to mention SHOW ALL includes descriptions.

Any modification suggestions from the group?

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  pgman@candle.pha.pa.us   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073
Index: doc/src/sgml/ref/show.sgml
===
RCS file: /cvsroot/pgsql/doc/src/sgml/ref/show.sgml,v
retrieving revision 1.38
diff -c -c -r1.38 show.sgml
*** doc/src/sgml/ref/show.sgml  8 Apr 2005 00:59:58 -   1.38
--- doc/src/sgml/ref/show.sgml  14 Jun 2005 20:39:20 -
***
*** 118,124 
  termliteralALL/literal/term
  listitem
   para
!   Show the values of all configuration parameters.
   /para
  /listitem
 /varlistentry
--- 118,124 
  termliteralALL/literal/term
  listitem
   para
!   Show the values of all configuration parameters, with descriptions.
   /para
  /listitem
 /varlistentry
***
*** 164,180 
 Show all settings:
  programlisting
  SHOW ALL;
!   name  | setting
! 
+--
!  add_missing_from   | off
!  archive_command| unset
!  australian_timezones   | off
  .
  .
  .
!  work_mem   | 1024
!  zero_damaged_pages | off
! (140 rows)
  /programlisting
/para
   /refsect1
--- 164,180 
 Show all settings:
  programlisting
  SHOW ALL;
!   name  |setting |
 description
  
! 
++--
!  add_missing_from   | off| 
Automatically adds missing table references to FROM clauses.
!  archive_command| unset  | WAL 
archiving command.
!  australian_timezones   | off| Interprets 
ACST, CST, EST, and SAT as Australian time zones.
  .
  .
  .
!  work_mem   | 1024   | Sets the 
maximum memory to be used for query workspaces.
!  zero_damaged_pages | off| Continues 
processing past damaged page headers.
! (146 rows)
  /programlisting
/para
   /refsect1
Index: src/backend/utils/misc/guc.c
===
RCS file: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v
retrieving revision 1.265
diff -c -c -r1.265 guc.c
*** src/backend/utils/misc/guc.c14 Jun 2005 17:43:13 -  1.265
--- src/backend/utils/misc/guc.c14 Jun 2005 20:39:24 -
***
*** 4337,4348 
  
if (pg_strcasecmp(name, all) == 0)
{
!   /* need a tuple descriptor representing two TEXT columns */
!   tupdesc = CreateTemplateTupleDesc(2, false);
TupleDescInitEntry(tupdesc, (AttrNumber) 1, name,
   TEXTOID, -1, 0);
TupleDescInitEntry(tupdesc, (AttrNumber) 2, setting,
   TEXTOID, -1, 0);
}
else
{
--- 4337,4351 
  
if (pg_strcasecmp(name, all) == 0)
{
!   /* need a tuple descriptor representing three TEXT columns */
!   tupdesc = CreateTemplateTupleDesc(3, false);
TupleDescInitEntry(tupdesc, (AttrNumber) 1, name,
   TEXTOID, -1, 0);
TupleDescInitEntry(tupdesc, (AttrNumber) 2, setting,
   TEXTOID, -1, 0);
+   TupleDescInitEntry(tupdesc, (AttrNumber) 3, description,
+  TEXTOID, -1, 0);
+ 
}
else
{
***
*** 4415,4428 
int i;
TupOutputState *tstate;

Re: [PATCHES] Tiny patch on print.c of psql

2005-06-14 Thread Bruce Momjian

I have applied your patch, and added the optimization that only leading
spaces are converted to 'nbsp;', as you suggested.

---

Jean-Paul Argudo wrote:
 Hi all,
 
 This is my 1st patch ever in C :-)... I was just borried by a bad psql
 \H html output of an EXPLAIN
 
 because it didnt respected spaces sent from backend like:
 
 - Sort
 - Sort
 
 I just remarked in this print.c the case of a white space wasnt handled 
 in the function escaping special caracters to HTML codes, so I added it 
 replacing a space by special html nbsp; ( n b s p).
 
 So we'll have now:
 
 -nbsp;Sort
 nbsp;nbsp;-nbsp;Sort
 
 ... in the html generated
 
 (see example at http://www.pack-solutions.net/~jpargudo/explain.html)
 
 Then, every single space in the html source is replaced by this. The
 source looks ugly, yes, I will look to *only replacing starting spaces* 
 of each row of the EXPLAIN, thats will be my 1st patch ever, version 2 :)
 
 So I post this patch only FYI..  I had much fun playing with C a bit :-)
 (yes, I dont code C, just a bit of Perl and Python).
 
 Cheers! Thanks again for such a powerfull release.
 
 -- 
 Jean-Paul Argudo
 www.PostgreSQLFr.org


 
 ---(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

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  pgman@candle.pha.pa.us   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073
Index: src/bin/psql/print.c
===
RCS file: /cvsroot/pgsql/src/bin/psql/print.c,v
retrieving revision 1.59
diff -c -c -r1.59 print.c
*** src/bin/psql/print.c14 Jun 2005 02:57:41 -  1.59
--- src/bin/psql/print.c14 Jun 2005 22:14:20 -
***
*** 595,602 
  html_escaped_print(const char *in, FILE *fout)
  {
const char *p;
! 
for (p = in; *p; p++)
switch (*p)
{
case '':
--- 595,604 
  html_escaped_print(const char *in, FILE *fout)
  {
const char *p;
!   boolleading_space = true;
!   
for (p = in; *p; p++)
+   {
switch (*p)
{
case '':
***
*** 617,625 
--- 619,637 
case '\'':
fputs(apos;, fout);
break;
+   case ' ':
+   /* protect leading space, for EXPLAIN output */
+   if (leading_space)
+   fputs(nbsp;, fout);
+   else
+   fputs( , fout);
+   break;
default:
fputc(*p, fout);
}
+   if (*p != ' ')
+   leading_space = false;
+   }
  }
  
  

---(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


Re: [PATCHES] indxpath.c refactoring

2005-06-14 Thread Simon Riggs
On Fri, 2005-06-10 at 18:33 -0400, Tom Lane wrote:
 Simon Riggs [EMAIL PROTECTED] writes:
  This simple refactoring patch moves all of the code associated with
  Partial Index planning into a single file.
 
 Applied with some revisions -
 
 * I put the new predtest.c file into optimizer/util, which seemed a more
   plausible location than /path, and gave it its own header file.
 
 * I thought check_partial_indexes() should stay in indxpath.c; it is an
   application of the theorem-proving module to indexes, not part of the
   prover proper.
 
 * I took the opportunity to rename pred_test() to predicate_implied_by(),
   which seems more clear about what it's doing and in which direction.
 

Many thanks.

 As for the future...
 
  - redesigning the low level routines to allow them to perform their
  stuff for both Partial Index and Constraint-based elimination (aka
  Partitioning...)
 
 The other main entry point should probably be called something like
 predicate_refuted_by?

Will do.

Best Regards, Simon Riggs



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


Re: [PATCHES] patch between symmetric (add doc)

2005-06-14 Thread Bruce Momjian
Pavel Stehule wrote:
 Hello
 
   I add doc and removed words symmetric and asymmetric from 
 keywords. Corrected boolean expression too. This patch don't solve some 
 problems: multiple evaluation of arguments, but its trivial and work with 
 bitmap indexes.

Docs adjusted and patch applied.  Thanks.

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  pgman@candle.pha.pa.us   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073
Index: doc/src/sgml/func.sgml
===
RCS file: /cvsroot/pgsql/doc/src/sgml/func.sgml,v
retrieving revision 1.255
diff -c -c -r1.255 func.sgml
*** doc/src/sgml/func.sgml  14 Jun 2005 21:04:38 -  1.255
--- doc/src/sgml/func.sgml  14 Jun 2005 23:46:19 -
***
*** 282,287 
--- 282,293 
  There is no difference between the two respective forms apart from
  the acronymCPU/acronym cycles required to rewrite the first one
  into the second one internally.
+ indexterm
+  primaryBETWEEN SYMETRIC/primary
+ /indexterm
+ tokenBETWEEN SYMMETRIC/ is the same as literalBETWEEN/
+ except there is no requirement that the argument to the left of 
literalAND/ be less than
+ or equal to the argument on the right;  the proper range is automatically 
determined.
 /para
  
 para
Index: src/backend/parser/gram.y
===
RCS file: /cvsroot/pgsql/src/backend/parser/gram.y,v
retrieving revision 2.492
diff -c -c -r2.492 gram.y
*** src/backend/parser/gram.y   8 Jun 2005 21:15:28 -   2.492
--- src/backend/parser/gram.y   14 Jun 2005 23:46:23 -
***
*** 338,344 
  /* ordinary key words in alphabetical order */
  %token keyword ABORT_P ABSOLUTE_P ACCESS ACTION ADD AFTER
AGGREGATE ALL ALSO ALTER ANALYSE ANALYZE AND ANY ARRAY AS ASC
!   ASSERTION ASSIGNMENT AT AUTHORIZATION
  
BACKWARD BEFORE BEGIN_P BETWEEN BIGINT BINARY BIT
BOOLEAN_P BOTH BY
--- 338,344 
  /* ordinary key words in alphabetical order */
  %token keyword ABORT_P ABSOLUTE_P ACCESS ACTION ADD AFTER
AGGREGATE ALL ALSO ALTER ANALYSE ANALYZE AND ANY ARRAY AS ASC
!   ASSERTION ASSIGNMENT ASYMMETRIC AT AUTHORIZATION
  
BACKWARD BEFORE BEGIN_P BETWEEN BIGINT BINARY BIT
BOOLEAN_P BOTH BY
***
*** 399,405 
SAVEPOINT SCHEMA SCROLL SECOND_P SECURITY SELECT SEQUENCE
SERIALIZABLE SESSION SESSION_USER SET SETOF SHARE
SHOW SIMILAR SIMPLE SMALLINT SOME STABLE START STATEMENT
!   STATISTICS STDIN STDOUT STORAGE STRICT_P SUBSTRING SYSID
  
TABLE TABLESPACE TEMP TEMPLATE TEMPORARY THEN TIME TIMESTAMP
TO TOAST TRAILING TRANSACTION TREAT TRIGGER TRIM TRUE_P
--- 399,406 
SAVEPOINT SCHEMA SCROLL SECOND_P SECURITY SELECT SEQUENCE
SERIALIZABLE SESSION SESSION_USER SET SETOF SHARE
SHOW SIMILAR SIMPLE SMALLINT SOME STABLE START STATEMENT
!   STATISTICS STDIN STDOUT STORAGE STRICT_P SUBSTRING SYMMETRIC
!   SYSID
  
TABLE TABLESPACE TEMP TEMPLATE TEMPORARY THEN TIME TIMESTAMP
TO TOAST TRAILING TRANSACTION TREAT TRIGGER TRIM TRUE_P
***
*** 6333,6350 
{
$$ = (Node *) 
makeSimpleA_Expr(AEXPR_OF, !=, $1, (Node *) $6);
}
!   | a_expr BETWEEN b_expr AND b_expr  
%prec BETWEEN
{
$$ = (Node *) makeA_Expr(AEXPR_AND, NIL,
!   (Node *) 
makeSimpleA_Expr(AEXPR_OP, =, $1, $3),
!   (Node *) 
makeSimpleA_Expr(AEXPR_OP, =, $1, $5));
}
!   | a_expr NOT BETWEEN b_expr AND b_expr  %prec 
BETWEEN
{
$$ = (Node *) makeA_Expr(AEXPR_OR, NIL,
!   (Node *) 
makeSimpleA_Expr(AEXPR_OP, , $1, $4),
!   (Node *) 
makeSimpleA_Expr(AEXPR_OP, , $1, $6));
}
| a_expr IN_P in_expr
{
/* in_expr returns a SubLink or a list 
of a_exprs */
--- 6334,6374 
{
$$ = (Node *) 
makeSimpleA_Expr(AEXPR_OF, !=, $1, (Node *) $6);
}
!   | a_expr BETWEEN opt_asymmetric b_expr AND b_expr   
%prec BETWEEN
{
$$ = (Node *) 

Re: [PATCHES] psql: \d+ show tablespace of indices

2005-06-14 Thread Bruce Momjian

Patch applied.  Thanks.

---
Qingqing Zhou wrote:
 
 Now \d show tablespace of indices per discussion.
 
 test=# \d e
Table public.e
  Column |  Type   | Modifiers
 +-+---
  i  | integer | not null
  j  | integer | not null
  k  | integer |
 Indexes:
 e_pkey PRIMARY KEY, btree (i, j), tablespace haha
 ei btree (i)
 ej btree (j), tablespace haha
 ek btree (k)
 Tablespace: haha
 
 

Content-Description: 

[ Attachment, skipping... ]

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

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  pgman@candle.pha.pa.us   |  (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 6: Have you searched our list archives?

   http://archives.postgresql.org


Re: [PATCHES] [HACKERS] Inefficiency in recent pgtz patch

2005-06-14 Thread Bruce Momjian

Patch applied.  Thanks.

---

Magnus Hagander wrote:
  Do you agree that using a hashtable for it in general is a good idea
  assuming this sideeffect is removed, though?
 
 I have no problem with the hashtable, only with preloading it with
 everything.  What I'd like to see is that the table inherited at fork()
 contains just the data for the default timezone.  (At least in the
 normal case where that setting hasn't been changed since postmaster
 start.)
 
 Here's a patch doing this. Changes score_timezone not to use pg_tzset(),
 and thus not loading all the zones in the cache. The actual timezone
 being picked will be set using set_global_timezone() which in turn calls
 pg_tzset() and loads it in the cache.
 
 
 //Magnus

Content-Description: tzcache.patch

[ Attachment, skipping... ]

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

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  pgman@candle.pha.pa.us   |  (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] Unicode characters above 0x10000 #2

2005-06-14 Thread Bruce Momjian

Patch applied.  Thanks.

---


John Hansen wrote:
 Bruce,
 
 Attached patch replaces the original, applied today against CVS HEAD.
 Fixes the surrogates, and limits to 4 byte utf8 as per spec.
 
 Also extends UtfToLocal to 4 byte characters (tho, it does not add any,
 just enables the code to handle them. If my interpretation of this code
 is wrong, please let me know, and correct it).
 
 ... John
 
  -Original Message-
  From: Bruce Momjian [mailto:[EMAIL PROTECTED] 
  Sent: Sunday, June 05, 2005 11:23 AM
  To: pgman@candle.pha.pa.us
  Cc: John Hansen; pgsql-hackers@postgresql.org; PostgreSQL-patches
  Subject: Re: [PATCHES] Unicode characters above 0x1 #2
  
  
  Your patch has been added to the PostgreSQL unapplied patches list at:
  
  http://momjian.postgresql.org/cgi-bin/pgpatches
  
  It will be applied as soon as one of the PostgreSQL 
  committers reviews and approves it.
  
  --
  -
  
  
  pgman wrote:
   
   I have backed out this patch.  It is unclear it is a bug fix.
   
   It will be saved for 8.1.
   
   
  --
   -
   
   pgman wrote:

Patch applied.  Thanks.


  
---


John Hansen wrote:
 3 times lucky?
 
 Last one broke utf8 G
 
 This one works, Too tired, sorry for the inconvenience..
 
 ... John

Content-Description: cvs.diff

[ Attachment, skipping... ]

 
 ---(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

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  pgman@candle.pha.pa.us   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, 
  Pennsylvania 19073
   
   -- 
 Bruce Momjian|  http://candle.pha.pa.us
 pgman@candle.pha.pa.us   |  (610) 359-1001
 +  If your life is a hard drive, |  13 Roberts Road
 +  Christ can be your backup.|  Newtown Square, 
  Pennsylvania 19073
  
   ===
   RCS file: /projects/cvsroot/pgsql/src/backend/utils/mb/wchar.c,v
   retrieving revision 1.38
   diff -c -r1.38 wchar.c
   *** src/backend/utils/mb/wchar.c  17 Sep 2004 21:59:57 
  -   1.38
   --- src/backend/utils/mb/wchar.c  21 Nov 2004 09:58:36 -
   ***
   *** 343,348 
   --- 343,373 
 return (pg_euc_dsplen(s));
 }
 
   + bool isLegalUTF8(const UTF8 *source, int len) {
   + UTF8 a;
   + const UTF8 *srcptr = source+len;
   + if(!source || (pg_utf_mblen(source) != len)) return false;
   + switch (len) {
   + default: return false;
   + /* Everything else falls through when true... */
   + case 6: if ((a = (*--srcptr))  0x80 || a  
  0xBF) return false;
   + case 5: if ((a = (*--srcptr))  0x80 || a  
  0xBF) return false;
   + case 4: if ((a = (*--srcptr))  0x80 || a  
  0xBF) return false;
   + case 3: if ((a = (*--srcptr))  0x80 || a  
  0xBF) return false;
   + case 2: if ((a = (*--srcptr))  0xBF) return false;
   + switch (*source) {
   + /* no fall-through in this inner switch */
   + case 0xE0: if (a  0xA0) return false; break;
   + case 0xF0: if (a  0x90) return false; break;
   + case 0xF4: if (a  0x8F) return false; break;
   + default:  if (a  0x80) return false;
   + }
   + case 1: if (*source = 0x80  *source  
  0xC2) return false;
   + if (*source  0xFD) return false;
   + }
   + return true;
   + }
   + 
 /*
  * convert UTF-8 string to pg_wchar (UCS-2)
  * caller should allocate enough space for to
   ***
   *** 398,404 
  * returns the byte length of a UTF-8 word pointed to by s
  */
 int
   ! pg_utf_mblen(const unsigned char *s)
 {
 int len = 1;
 
   --- 423,429 
  * returns the byte length of a UTF-8 word pointed to by s
  */
 int
   ! pg_utf_mblen(const UTF8 *s)
 {
 int len = 1;
 
   ***
   *** 406,418 
 len = 1;
 else if ((*s  0xe0) == 0xc0)
 len = 2;
   ! else if ((*s  0xe0) == 0xe0)
   ! len = 3;
 return 

Re: [PATCHES] AT TIME ZONE with full timezones

2005-06-14 Thread Bruce Momjian

Patch applied.  Thanks.  Doc updates applied too.

---


Magnus Hagander wrote:
 This patch makes it possible to use the full set of timezones when doing
 AT TIME ZONE, and not just the shorlist previously available. For
 example:
 
 SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London';
 
 works fine now. It will also obey whatever DST rules were in effect at
 just that date, which the previous implementation did not.
 
 It also supports the AT TIME ZONE on the timetz datatype. The whole
 handling of DST is a bit bogus there, so I chose to make it use whatever
 DST rules are in effect at the time of executig the query. not sure if
 anybody is actuallyi *using* timetz though, it seems pretty
 unpredictable just because of this...
 
 Docs updates forthcoming assuming this approach is considered good ;-)
 
 //Magnus

Content-Description: timezones.patch

[ Attachment, skipping... ]

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

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  pgman@candle.pha.pa.us   |  (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 6: Have you searched our list archives?

   http://archives.postgresql.org


Re: [PATCHES] plperl: enable UTF-8 support

2005-06-14 Thread Bruce Momjian

Newest patch applied.  Thanks.

---

Bruce Momjian wrote:
 
 It seems the plperl code has changed in the areas you are modifying. 
 Would you update your patch against current CVS?  Thanks.
 
 ---
 
 David Kamholz wrote:
  Hello,
  
  Here's a patch I added against plperl, originally against beta5, now 
  against rc1. It simply checks with GetDatabaseEncoding() if the current 
  database is in UTF-8, and if so, sets the UTF-8 flag on the arguments 
  that are passed to perl. This means that it isn't necessary to 
  utf8::upgrade() every string, as perl has no way of knowing offhand 
  that a string is UTF-8 -- but postgres does, because the database 
  encoding is specified, so it makes sense to turn the flag on. You 
  should also be able to properly manipulate UTF-8 strings now from 
  plperl as opposed to plperlu, because otherwise you'd have to use 
  encoding 'utf8' which was not allowed. It could also eliminate some 
  unexpected bugs if you assume that perl knows the string is unicode. It 
  is enabled only for perl 5.6 and higher, so earlier versions will not 
  be affected.
  
  I have been assured by crab that the patch is quite harmless and will 
  not break anything. It would be great to see it in 8 final! :-)
  
  Regards,
  Dave
  
 
 [ Attachment, skipping... ]
 
  
  ---(end of broadcast)---
  TIP 4: Don't 'kill -9' the postmaster
 
 -- 
   Bruce Momjian|  http://candle.pha.pa.us
   pgman@candle.pha.pa.us   |  (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/faq
 

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  pgman@candle.pha.pa.us   |  (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 4: Don't 'kill -9' the postmaster


Re: [PATCHES] dbsize backend integration

2005-06-14 Thread Bruce Momjian
Andreas Pflug wrote:
 As a start for a bunch of instrumentation functions that should be 
 included in the backend as discussed previously, here are the dbsize 
 functions. The dbsize.c file should go to the usual place, 
 src/backend/utils/adt.

How does this related to /contrib/dbsize?  You have moved some
functions, but not recreated others.

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  pgman@candle.pha.pa.us   |  (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 4: Don't 'kill -9' the postmaster