[PATCHES] pgcrypto warnings for Sun's cc

2005-07-12 Thread Kris Jurka

This patch removes a couple of warnings Sun's cc reports in 
contrib/pgcrypto.

cc -Xa -v -g -KPIC  -I. -I../../src/include -I/usr/local/include  -c -o sha2.o 
sha2.c
sha2.c, line 173: warning: storage class after type is obsolescent
sha2.c, line 193: warning: storage class after type is obsolescent
sha2.c, line 205: warning: storage class after type is obsolescent
sha2.c, line 249: warning: storage class after type is obsolescent
sha2.c, line 261: warning: storage class after type is obsolescent

Kris JurkaIndex: contrib/pgcrypto/sha2.c
===
RCS file: /projects/cvsroot/pgsql/contrib/pgcrypto/sha2.c,v
retrieving revision 1.3
diff -c -r1.3 sha2.c
*** contrib/pgcrypto/sha2.c 11 Jul 2005 15:40:38 -  1.3
--- contrib/pgcrypto/sha2.c 12 Jul 2005 18:00:03 -
***
*** 170,176 
  
  /*** SHA-XYZ INITIAL HASH VALUES AND CONSTANTS /
  /* Hash constant words K for SHA-256: */
! const static uint32 K256[64] = {
0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL,
0x3956c25bUL, 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL,
0xd807aa98UL, 0x12835b01UL, 0x243185beUL, 0x550c7dc3UL,
--- 170,176 
  
  /*** SHA-XYZ INITIAL HASH VALUES AND CONSTANTS /
  /* Hash constant words K for SHA-256: */
! static const uint32 K256[64] = {
0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL,
0x3956c25bUL, 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL,
0xd807aa98UL, 0x12835b01UL, 0x243185beUL, 0x550c7dc3UL,
***
*** 190,196 
  };
  
  /* Initial hash value H for SHA-256: */
! const static uint32 sha256_initial_hash_value[8] = {
0x6a09e667UL,
0xbb67ae85UL,
0x3c6ef372UL,
--- 190,196 
  };
  
  /* Initial hash value H for SHA-256: */
! static const uint32 sha256_initial_hash_value[8] = {
0x6a09e667UL,
0xbb67ae85UL,
0x3c6ef372UL,
***
*** 202,208 
  };
  
  /* Hash constant words K for SHA-384 and SHA-512: */
! const static uint64 K512[80] = {
0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL,
0xb5c0fbcfec4d3b2fULL, 0xe9b5dba58189dbbcULL,
0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL,
--- 202,208 
  };
  
  /* Hash constant words K for SHA-384 and SHA-512: */
! static const uint64 K512[80] = {
0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL,
0xb5c0fbcfec4d3b2fULL, 0xe9b5dba58189dbbcULL,
0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL,
***
*** 246,252 
  };
  
  /* Initial hash value H for SHA-384 */
! const static uint64 sha384_initial_hash_value[8] = {
0xcbbb9d5dc1059ed8ULL,
0x629a292a367cd507ULL,
0x9159015a3070dd17ULL,
--- 246,252 
  };
  
  /* Initial hash value H for SHA-384 */
! static const uint64 sha384_initial_hash_value[8] = {
0xcbbb9d5dc1059ed8ULL,
0x629a292a367cd507ULL,
0x9159015a3070dd17ULL,
***
*** 258,264 
  };
  
  /* Initial hash value H for SHA-512 */
! const static uint64 sha512_initial_hash_value[8] = {
0x6a09e667f3bcc908ULL,
0xbb67ae8584caa73bULL,
0x3c6ef372fe94f82bULL,
--- 258,264 
  };
  
  /* Initial hash value H for SHA-512 */
! static const uint64 sha512_initial_hash_value[8] = {
0x6a09e667f3bcc908ULL,
0xbb67ae8584caa73bULL,
0x3c6ef372fe94f82bULL,

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


[PATCHES] Doc patch: New PL/Perl Features

2005-07-12 Thread David Fetter
Folks,

Please find enclosed document patches for PL/Perl features recently
introduced in CVS TIP.  These include:

return_next
returning PostgreSQL arrays
spi_query/spi_fetchrow
use strict

Cheers,
D
-- 
David Fetter [EMAIL PROTECTED] http://fetter.org/
phone: +1 510 893 6100   mobile: +1 415 235 3778

Remember to vote!
Index: doc/src/sgml/plperl.sgml
===
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/plperl.sgml,v
retrieving revision 2.41
diff -c -r2.41 plperl.sgml
*** doc/src/sgml/plperl.sgml5 Jun 2005 03:16:29 -   2.41
--- doc/src/sgml/plperl.sgml12 Jul 2005 19:18:05 -
***
*** 54,59 
--- 54,86 
  /programlisting
 The body of the function is ordinary Perl code.
/para
+ para
+ As with ordinary Perl code, you should use the strict pragma,
+ which you can do one of two ways:
+ 
+ itemizedlist
+ listitem
+ para
+ Globally, by turning on plperl (one of the xref
+ linkend=guc-custom-variable-classes
+ endterm=custom_variable_classes you can use) and setting
+ plperl.strict to true in your postgresql.conf, or
+ /para
+ /listitem
+ listitem
+ para
+ One function at a time, by using PL/PerlU (you must be
+ database superuser to do this) and issuing a
+ 
+ programlisting
+ use strict;
+ /programlisting
+ 
+ in the code.
+ /para
+ /listitem
+ /itemizedlist
+ /para
  
 para
  The syntax of the commandCREATE FUNCTION/command command requires
***
*** 118,123 
--- 145,165 
/para
  
para
+Perl can return PostgreSQL arrays as references to Perl arrays.
+ Here is an example:
+ programlisting
+ CREATE OR REPLACE function returns_array()
+ RETURNS text[][]
+ LANGUAGE plperl
+ AS $$
+ return [['ab','c,d'],['e\\f','g']];
+ $$;
+ 
+ select returns_array();
+ /programlisting
+   /para
+ 
+   para
 Composite-type arguments are passed to the function as references
 to hashes.  The keys of the hash are the attribute names of the
 composite type.  Here is an example:
***
*** 158,171 
/para
  
para
!PL/Perl functions can also return sets of either scalar or composite
!types.  To do this, return a reference to an array that contains
!either scalars or references to hashes, respectively.  Here are
!some simple examples:
  
  programlisting
  CREATE OR REPLACE FUNCTION perl_set_int(int) RETURNS SETOF INTEGER AS $$
! return [0..$_[0]];
  $$ LANGUAGE plperl;
  
  SELECT * FROM perl_set_int(5);
--- 200,240 
/para
  
para
! PL/Perl functions can also return sets of either scalar or
! composite types.  In general, you'll want to return rows one at a
! time both to speed up startup time and to keep from queueing up
! the entire result set in memory.  You can do this with
! functionreturn_next/function as illustrated below:
! programlisting
! CREATE OR REPLACE FUNCTION perl_set_int(int)
! RETURNS SETOF INTEGER
! LANGUAGE plperl AS $$
! foreach (0..$_[0]) {
! return_next($_);
! }
! return;
! $$;
! 
! SELECT * FROM perl_set_int(5);
! 
! CREATE OR REPLACE FUNCTION perl_set()
! RETURNS SETOF testrowperl
! LANGUAGE plperl AS $$
! return_next({f1 = 1, f2 = 'Hello', f3 = 'World' });
! return_next({ f1 = 2, f2 = 'Hello', f3 = 'PostgreSQL' });
! return_next({ f1 = 3, f2 = 'Hello', f3 = 'PL/Perl' });
! return;
! $$;
! /programlisting
! 
! For small result sets, you can return a reference to
! an array that contains either scalars or references to hashes,
! respectively.  Here are some simple examples of returning the
! entire result set as a reference:
  
  programlisting
  CREATE OR REPLACE FUNCTION perl_set_int(int) RETURNS SETOF INTEGER AS $$
! return [0..$_[0]];
  $$ LANGUAGE plperl;
  
  SELECT * FROM perl_set_int(5);
***
*** 182,192 
  SELECT * FROM perl_set();
  /programlisting
  
-When you do this, Perl will have to build the entire array in memory;
-therefore the technique does not scale to very large result sets. You
-can instead call functionreturn_next/function for each element of
-the result set, passing it either a scalar or a reference to a hash,
-as appropriate to your function's return type.
/para
  
  para
--- 251,256 
***
*** 217,223 
/para
  
para
!PL/Perl itself presently provides two additional Perl commands:
  
 variablelist
  varlistentry
--- 281,287 
/para
  
para
!PL/Perl itself presently provides four additional Perl commands:
  
 variablelist
  varlistentry
***
*** 228,233 
--- 292,301 
  
   
termliteralfunctionspi_exec_query/(replaceablequery/replaceable [, 
replaceablemax-rows/replaceable])/literal/term
   

Re: [PATCHES] Doc patch: New PL/Perl Features

2005-07-12 Thread David Fetter
On Tue, Jul 12, 2005 at 12:21:29PM -0700, David Fetter wrote:
 Folks,
 
 Please find enclosed document patches for PL/Perl features recently
 introduced in CVS TIP.  These include:
 
 return_next
 returning PostgreSQL arrays
 spi_query/spi_fetchrow
 use strict
 
 Cheers,
 D

Oops.  Persuant to corrections and clarifications by Andrew Dunstan,
please find enclosed a better patch.

Cheers,
D
-- 
David Fetter [EMAIL PROTECTED] http://fetter.org/
phone: +1 510 893 6100   mobile: +1 415 235 3778

Remember to vote!
Index: doc/src/sgml/plperl.sgml
===
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/plperl.sgml,v
retrieving revision 2.41
diff -c -r2.41 plperl.sgml
*** doc/src/sgml/plperl.sgml5 Jun 2005 03:16:29 -   2.41
--- doc/src/sgml/plperl.sgml12 Jul 2005 19:59:40 -
***
*** 54,59 
--- 54,86 
  /programlisting
 The body of the function is ordinary Perl code.
/para
+ para
+ As with ordinary Perl code, you should use the strict pragma,
+ which you can do one of two ways:
+ 
+ itemizedlist
+ listitem
+ para
+ Globally, by turning on plperl (one of the xref
+ linkend=guc-custom-variable-classes
+ endterm=custom_variable_classes you can use) and setting
+ plperl.use_strict to true in your postgresql.conf, or
+ /para
+ /listitem
+ listitem
+ para
+ One function at a time, by using PL/PerlU (you must be
+ database superuser to do this) and issuing a
+ 
+ programlisting
+ use strict;
+ /programlisting
+ 
+ in the code.
+ /para
+ /listitem
+ /itemizedlist
+ /para
  
 para
  The syntax of the commandCREATE FUNCTION/command command requires
***
*** 118,123 
--- 145,165 
/para
  
para
+Perl can return PostgreSQL arrays as references to Perl arrays.
+ Here is an example:
+ programlisting
+ CREATE OR REPLACE function returns_array()
+ RETURNS text[][]
+ LANGUAGE plperl
+ AS $$
+ return [['ab','c,d'],['e\\f','g']];
+ $$;
+ 
+ select returns_array();
+ /programlisting
+   /para
+ 
+   para
 Composite-type arguments are passed to the function as references
 to hashes.  The keys of the hash are the attribute names of the
 composite type.  Here is an example:
***
*** 158,171 
/para
  
para
!PL/Perl functions can also return sets of either scalar or composite
!types.  To do this, return a reference to an array that contains
!either scalars or references to hashes, respectively.  Here are
!some simple examples:
  
  programlisting
  CREATE OR REPLACE FUNCTION perl_set_int(int) RETURNS SETOF INTEGER AS $$
! return [0..$_[0]];
  $$ LANGUAGE plperl;
  
  SELECT * FROM perl_set_int(5);
--- 200,245 
/para
  
para
! PL/Perl functions can also return sets of either scalar or
! composite types.  In general, you'll want to return rows one at a
! time both to speed up startup time and to keep from queueing up
! the entire result set in memory.  You can do this with
! functionreturn_next/function as illustrated below.  Note that
! after the last functionreturn_next/function, you must put
! either literalreturn;/literal or (better) literalreturn
! undef;/literal
! 
! programlisting
! CREATE OR REPLACE FUNCTION perl_set_int(int)
! RETURNS SETOF INTEGER
! LANGUAGE plperl AS $$
! foreach (0..$_[0]) {
! return_next($_);
! }
! return undef;
! $$;
! 
! SELECT * FROM perl_set_int(5);
! 
! CREATE OR REPLACE FUNCTION perl_set()
! RETURNS SETOF testrowperl
! LANGUAGE plperl AS $$
! return_next({f1 = 1, f2 = 'Hello', f3 = 'World' });
! return_next({ f1 = 2, f2 = 'Hello', f3 = 'PostgreSQL' });
! return_next({ f1 = 3, f2 = 'Hello', f3 = 'PL/Perl' });
! return undef;
! $$;
! /programlisting
! 
! For small result sets, you can return a reference to an array that
! contains either scalars, references to arrays, or references to
! hashes for simple types, array types, and composite types,
! respectively.  Here are some simple examples of returning the entire
! result set as a reference:
  
  programlisting
  CREATE OR REPLACE FUNCTION perl_set_int(int) RETURNS SETOF INTEGER AS $$
! return [0..$_[0]];
  $$ LANGUAGE plperl;
  
  SELECT * FROM perl_set_int(5);
***
*** 182,192 
  SELECT * FROM perl_set();
  /programlisting
  
-When you do this, Perl will have to build the entire array in memory;
-therefore the technique does not scale to very large result sets. You
-can instead call functionreturn_next/function for each element of
-the result set, passing it either a scalar or a reference to a hash,
-as appropriate to your function's return type.
/para
  
  para
--- 256,261 
***
*** 217,223 
/para
  
para
!PL/Perl itself presently provides two additional 

Re: [PATCHES] pgcrypto warnings for Sun's cc

2005-07-12 Thread Tom Lane
Kris Jurka [EMAIL PROTECTED] writes:
 This patch removes a couple of warnings Sun's cc reports in 
 contrib/pgcrypto.

Applied, thanks.

regards, tom lane

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

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


Re: [PATCHES] A couple of patches for PostgreSQL 64bit support

2005-07-12 Thread Koichi Suzuki
Hi,

Attached is a result of pgbench with 64bit patch PostgreSQL (base is
8.0.1).  Benchmark machine is dual opteron (1.4GHz, 1MB cache each) with
8GB of memory and 120GB of IDE hard disk.

Koichi Suzuki wrote:
 I have some experimeltal data about this extension.   I will gather it
 and post hopefully this weekend.


-- 
---
Koichi Suzuki
Open Source Engineeering Departmeent,
NTT DATA Intellilink Corporation
Phone: +81-3-5566-9628  WWW: http://www.intellilink.co.jp
--


64-bit-pgbench20050712.pdf
Description: Adobe PDF document

---(end of broadcast)---
TIP 1: 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


[PATCHES] SQLException: Cannot be less than zero

2005-07-12 Thread xavier.marquis



Hi,

I use PostgreSQL 8.0.3 and following associated 
drivers :

postgresql-8.0-311.jdbc2.jar
postgresql-8.0-311.jdbc2ee.jar
postgresql-8.0-311.jdbc3.jar

I want to use CachedRowSetImpl to populate one row 
in thefollowing table :

CREATE TABLE "Form2"( form2member3 
int4, form2member5 int8[],) WITHOUT OIDS;
The second column (an array of bigint) seems 
to cause the following exceptionwhen try to populate :

java.sql.SQLException: Invalid 
column display size. Cannot be less than zero
at 
javax.sql.rowset.RowSetMetaDataImpl.setColumnDisplaySize(RowSetMetaDataImpl.java:267)
at 
com.sun.rowset.CachedRowSetImpl.initMetaData(CachedRowSetImpl.java:679)
at 
com.sun.rowset.CachedRowSetImpl.populate(CachedRowSetImpl.java:597)
at 
com.sun.rowset.internal.CachedRowSetReader.readData(CachedRowSetReader.java:170)
at 
com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:736)
at ...
at 
MainTester.main(MainTester.java:41)


After readingthe onlyfew related subjects, I 
can't find any solutionthat I be able to use.
(Nebojsa Vasiljevic made a patch but didn't 
say how to do it ...)

Hassomeoneyet met and solved this unexpected 
problem (even momently)?
Otherwise, Is there another way to deal with variable-length 
lists ?





Re: [PATCHES] thousands comma numeric formatting in psql

2005-07-12 Thread Bruce Momjian
Peter Eisentraut wrote:
 Bruce Momjian wrote:
  I have heavily modified your patch and have applied it.  Instead of
  using langinfo, I used a \pset variable numericsep.
 
 Why?

Because I don't have langinfo on my system, so I can't test it, nor add
configure code for it.  It also prevents us from using space as the
separator, which is the international standard.

If you think we should use langinfo, we can discuss it, but at this
point, it is not used.

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


Re: [PATCHES] SQLException: Cannot be less than zero

2005-07-12 Thread Andrew Dunstan


This is completely the wrong list to ask this question - you need to ask 
on the lists at


http://jdbc.postgresql.org/lists.html

cheers

andrew


[EMAIL PROTECTED] wrote:


Hi,
 
I use PostgreSQL 8.0.3 and following associated drivers : 
 
postgresql-8.0-311.jdbc2.jar

postgresql-8.0-311.jdbc2ee.jar
postgresql-8.0-311.jdbc3.jar
 
I want to use CachedRowSetImpl to populate one row in the following 
table :
 
CREATE TABLE Form2

(
  form2member3 int4,
  form2member5 int8[],
)
WITHOUT OIDS;
The second column (an array of bigint)  seems to cause the following 
exception when try to populate :
 
java.sql.SQLException: Invalid column display size. Cannot be less 
than zero
at 
javax.sql.rowset.RowSetMetaDataImpl.setColumnDisplaySize(RowSetMetaDataImpl.java:267)

at com.sun.rowset.CachedRowSetImpl.initMetaData(CachedRowSetImpl.java:679)
at com.sun.rowset.CachedRowSetImpl.populate(CachedRowSetImpl.java:597)
at 
com.sun.rowset.internal.CachedRowSetReader.readData(CachedRowSetReader.java:170)

at com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:736)
at ...
at MainTester.main(MainTester.java:41)
 
 
After reading the only few related subjects, I can't find any 
solution that I be able to use.

(*Nebojsa Vasiljevic *made a patch but didn't say how to do it ...)
 
Has someone yet met and solved this unexpected problem (even momently) ?

Otherwise, Is there another way to deal with variable-length lists  ?
 
 
 



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

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


Re: [PATCHES] Doc patch: New PL/Perl Features

2005-07-12 Thread Neil Conway

David Fetter wrote:

On Tue, Jul 12, 2005 at 12:21:29PM -0700, David Fetter wrote:


Folks,

Please find enclosed document patches for PL/Perl features recently
introduced in CVS TIP.  These include:

return_next
returning PostgreSQL arrays
spi_query/spi_fetchrow
use strict

Cheers,
D



Oops.  Persuant to corrections and clarifications by Andrew Dunstan,
please find enclosed a better patch.


Applied with editorialization; see comments below. Thanks for the patch.


+ itemizedlist
+ listitem
+ para
+ Globally, by turning on plperl (one of the xref
+ linkend=guc-custom-variable-classes
+ endterm=custom_variable_classes you can use) and setting
+ plperl.use_strict to true in your postgresql.conf, or
+ /para


Needs a filename/ and a literal/. Also the xref/ doesn't compile 
using openjade 1.3.1



para
+Perl can return PostgreSQL arrays as references to Perl arrays.
+ Here is an example:


Needs productname/ around PostgreSQL for consistency with the rest 
of the SGML docs.



+ programlisting
+ CREATE OR REPLACE function returns_array()
+ RETURNS text[][]
+ LANGUAGE plperl
+ AS $$
+ return [['ab','c,d'],['e\\f','g']];
+ $$;
+ 
+ select returns_array();


CREATE FUNCTION ... AS $$ ... $$ LANGUAGE plperl; would be more 
consistent with the other PL/Perl examples.



! CREATE OR REPLACE FUNCTION perl_set()
! RETURNS SETOF testrowperl
! LANGUAGE plperl AS $$
! return_next({f1 = 1, f2 = 'Hello', f3 = 'World' });
! return_next({ f1 = 2, f2 = 'Hello', f3 = 'PostgreSQL' });
! return_next({ f1 = 3, f2 = 'Hello', f3 = 'PL/Perl' });
! return undef;
! $$;
! /programlisting


Should probably use gt; not .


   termliteralfunctionspi_exec_query/(replaceablequery/replaceable [, 
replaceablemax-rows/replaceable])/literal/term
   
termliteralfunctionspi_exec_query/(replaceablecommand/replaceable)/literal/term
+  
termliteralfunctionspi_query/(replaceablequery/replaceable)/literal/term
+  termliteralfunctionspi_fetchrow/(replaceableresult of 
spi_query/replaceable)/literal/term
+  termliteral
+  /literal/term
   listitem
para
 Executes an SQL command.  Here is an example of a query


This needs more work -- the difference in behavior between spi_query() 
and spi_exec_query() is not described, so I didn't apply this hunk.



*** 4103,4111 
   when using custom variables:
  
  programlisting

! custom_variable_classes = 'plr,pljava'
  plr.path = '/usr/lib/R'
  pljava.foo = 1
  plruby.bar = true# generates error, unknown class name
  /programlisting
  /para
--- 4103,4112 
   when using custom variables:
  
  programlisting

! custom_variable_classes = 'plperl,plr,pljava'
  plr.path = '/usr/lib/R'
  pljava.foo = 1
+ plperl.use_strict = true # now without having to use pl/perlU! :)
  plruby.bar = true# generates error, unknown class name
  /programlisting
  /para


I didn't see why this was relevant, so I didn't apply it.

-Neil

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


[PATCHES] backslashes in pgindent

2005-07-12 Thread Bruce Momjian
Luke, I have had to back out the removal of backslashes in the pgindent
awk script.  Your patch was to remove them:

line1 !~ ^typedef 
line1 !~ ^extern[  ][  ]*\C\ 
line1 !~ = 
!   line1 ~ \))
print int  pgindent_func_no_var_fix;;
line1 = line2;
}
--- 56,62 
line1 !~ ^typedef 
line1 !~ ^extern[  ][  ]*\C\ 
line1 !~ = 
!   line1 ~ ))
print int  pgindent_func_no_var_fix;;
line1 = line2;

I found that parentheses in gawk regular expressions require backslashes
so they are not treated as regex groupings:

$ echo '('|awk '$0 ~ /(/ {print $0}'
awk: cmd. line:1: fatal: Unmatched ( or \(: /(/
$ echo '('|awk '$0 ~ /\(/ {print $0}'
(

Now, it seems closing parentheses are OK because there is no open group,
but I think I should use backslashes there too:

$ echo ')'|awk '$0 ~ /)/ {print $0}'
)
$ echo ')'|awk '$0 ~ /\)/ {print $0}'

Does your awk produce different results?  What version is it?  Mine is GNU Awk
3.0.6.

-- 
  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/tools/pgindent/pgindent
===
RCS file: /cvsroot/pgsql/src/tools/pgindent/pgindent,v
retrieving revision 1.75
diff -c -c -r1.75 pgindent
*** src/tools/pgindent/pgindent 28 Jun 2005 23:55:30 -  1.75
--- src/tools/pgindent/pgindent 13 Jul 2005 03:53:46 -
***
*** 56,62 
line1 !~ /^typedef/ 
line1 !~ /^extern[  ][  ]*C/ 
line1 !~ /=/ 
!   line1 ~ /)/)
print int  pgindent_func_no_var_fix;;
line1 = line2;
}
--- 56,62 
line1 !~ /^typedef/ 
line1 !~ /^extern[  ][  ]*C/ 
line1 !~ /=/ 
!   line1 ~ /\)/)
print int  pgindent_func_no_var_fix;;
line1 = line2;
}
***
*** 1688,1703 
  #  like real functions.
awk '   BEGIN   {paren_level = 0}  
{
!   if ($0 ~ /^[a-zA-Z_][a-zA-Z_0-9]*[^(]*$/)
{
saved_len = 0;
saved_lines[++saved_len] = $0;
if ((getline saved_lines[++saved_len]) == 0)
print saved_lines[1];
else
!   if (saved_lines[saved_len] !~ 
/^[a-zA-Z_][a-zA-Z_0-9]*(/ ||
!   saved_lines[saved_len] ~  
/^[a-zA-Z_][a-zA-Z_0-9]*(.*)$/ ||
!   saved_lines[saved_len] ~  
/^[a-zA-Z_][a-zA-Z_0-9]*(.*);$/)
{
print saved_lines[1];
print saved_lines[2];
--- 1688,1703 
  #  like real functions.
awk '   BEGIN   {paren_level = 0}  
{
!   if ($0 ~ /^[a-zA-Z_][a-zA-Z_0-9]*[^\(]*$/)
{
saved_len = 0;
saved_lines[++saved_len] = $0;
if ((getline saved_lines[++saved_len]) == 0)
print saved_lines[1];
else
!   if (saved_lines[saved_len] !~ 
/^[a-zA-Z_][a-zA-Z_0-9]*\(/ ||
!   saved_lines[saved_len] ~  
/^[a-zA-Z_][a-zA-Z_0-9]*\(.*\)$/ ||
!   saved_lines[saved_len] ~  
/^[a-zA-Z_][a-zA-Z_0-9]*\(.*\);$/)
{
print saved_lines[1];
print saved_lines[2];
***
*** 1714,1720 
}
for (i=1; i = saved_len; i++)
{
!   if (i == 1  saved_lines[saved_len] ~ 
/);$/)
{
printf %s, saved_lines[i];
if (substr(saved_lines[i], 
length(saved_lines[i]),1) != *)
--- 1714,1720 
}
for (i=1; i = saved_len; i++)
{
!   if (i == 1  saved_lines[saved_len] ~ 

Re: [PATCHES] [DOCS] Doc patch: New PL/Perl Features

2005-07-12 Thread Bruce Momjian

Oops, already applied.  (Seems my threading email is busted.)

---

David Fetter wrote:
 Folks,
 
 Please find enclosed document patches for PL/Perl features recently
 introduced in CVS TIP.  These include:
 
 return_next
 returning PostgreSQL arrays
 spi_query/spi_fetchrow
 use strict
 
 Cheers,
 D
 -- 
 David Fetter [EMAIL PROTECTED] http://fetter.org/
 phone: +1 510 893 6100   mobile: +1 415 235 3778
 
 Remember to vote!

[ Attachment, skipping... ]

 
 ---(end of broadcast)---
 TIP 5: 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 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