Re: [PATCHES] compiler warning fix
Zdenek Kotala <[EMAIL PROTECTED]> writes: > Sun studio reports following warnings during > src/interfaces/ecpg/ecpglib/prepare.c compilation: > "prepare.c", line 34: warning: storage class after type is obsolescent > "prepare.c", line 35: warning: storage class after type is obsolescent Yeah, it's right: the C spec deprecates that. Patch applied, thanks. regards, tom lane ---(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] compiler warning fix
Sun studio reports following warnings during src/interfaces/ecpg/ecpglib/prepare.c compilation: "prepare.c", line 34: warning: storage class after type is obsolescent "prepare.c", line 35: warning: storage class after type is obsolescent Attached patch fixes a problem. Zdenek Index: src/interfaces/ecpg/ecpglib/prepare.c === RCS file: /zfs_data/cvs_pgsql/cvsroot/pgsql/src/interfaces/ecpg/ecpglib/prepare.c,v retrieving revision 1.22 diff -c -r1.22 prepare.c *** src/interfaces/ecpg/ecpglib/prepare.c 3 Oct 2007 11:11:12 - 1.22 --- src/interfaces/ecpg/ecpglib/prepare.c 5 Nov 2007 20:35:41 - *** *** 31,38 } stmtCacheEntry; static int nextStmtID = 1; ! const static int stmtCacheNBuckets= 2039; /* # buckets - a prime # */ ! const static int stmtCacheEntPerBucket= 8;/* # entries/bucket */ static stmtCacheEntry stmtCacheEntries[16384] = {{0,{0},0,0,0}}; static struct prepared_statement *find_prepared_statement(const char *name, --- 31,38 } stmtCacheEntry; static int nextStmtID = 1; ! static const int stmtCacheNBuckets= 2039; /* # buckets - a prime # */ ! static const int stmtCacheEntPerBucket= 8;/* # entries/bucket */ static stmtCacheEntry stmtCacheEntries[16384] = {{0,{0},0,0,0}}; static struct prepared_statement *find_prepared_statement(const char *name, ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
Re: [PATCHES] [HACKERS] Unclarity of configure options
Andrew Dunstan wrote: > > > Bruce Momjian wrote: > > Andrew Dunstan wrote: > > > >> Tom Lane wrote: > >> > >>> Bruce Momjian <[EMAIL PROTECTED]> writes: > >>> > >>> > I have modified the configure message to be: > --with-libxslt build /contrib/xml2 with XSLT support > > > >>> This turns the message from something merely a tad unclear into an > >>> outright lie. "--with-libxslt" does not cause contrib/xml2 (or any > >>> other part of contrib) to get built. Better would be > >>> > >>> --with-libxslt build with XSLT (affects only contrib/xml2) > >>> > >>> > >>> > >>> > >> What is more, if we're going to do this we should mark *all* the options > >> that only affect contrib, which is why I objected to doing this on its > >> own in the first place. > >> > > > > Uh, what other configure options to we have that only affect /contrib? > > > > > > --with-ossp-uuid at least, IIRC > > This was discussed previously, BTW. Maybe you haven't read all the mail. Sorry, no I missed that. Patch attached and applied. -- Bruce Momjian <[EMAIL PROTECTED]>http://momjian.us EnterpriseDB http://postgres.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + Index: configure === RCS file: /cvsroot/pgsql/configure,v retrieving revision 1.568 diff -c -c -r1.568 configure *** configure 4 Nov 2007 18:53:39 - 1.568 --- configure 5 Nov 2007 17:42:10 - *** *** 896,902 --with-openssl build with OpenSSL support --without-readline do not use GNU Readline nor BSD Libedit for editing --with-libedit-preferred prefer BSD Libedit over GNU Readline ! --with-ossp-uuidbuild with OSSP UUID library for UUID generation --with-libxml build with XML support --with-libxslt use XSLT support when building /contrib/xml2 --with-system-tzdata=DIR use system time zone data in DIR --- 896,902 --with-openssl build with OpenSSL support --without-readline do not use GNU Readline nor BSD Libedit for editing --with-libedit-preferred prefer BSD Libedit over GNU Readline ! --with-ossp-uuiduse OSSP UUID library when building /contrib/uuid-ossp --with-libxml build with XML support --with-libxslt use XSLT support when building /contrib/xml2 --with-system-tzdata=DIR use system time zone data in DIR Index: configure.in === RCS file: /cvsroot/pgsql/configure.in,v retrieving revision 1.534 diff -c -c -r1.534 configure.in *** configure.in 4 Nov 2007 18:53:39 - 1.534 --- configure.in 5 Nov 2007 17:42:11 - *** *** 569,575 # # OSSP UUID library # ! PGAC_ARG_BOOL(with, ossp-uuid, no, [ --with-ossp-uuidbuild with OSSP UUID library for UUID generation]) AC_SUBST(with_ossp_uuid) --- 569,575 # # OSSP UUID library # ! PGAC_ARG_BOOL(with, ossp-uuid, no, [ --with-ossp-uuiduse OSSP UUID library when building /contrib/uuid-ossp ]) AC_SUBST(with_ossp_uuid) Index: doc/src/sgml/installation.sgml === RCS file: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v retrieving revision 1.296 diff -c -c -r1.296 installation.sgml *** doc/src/sgml/installation.sgml 4 Nov 2007 18:53:39 - 1.296 --- doc/src/sgml/installation.sgml 5 Nov 2007 17:42:11 - *** *** 937,947 --with-ossp-uuid ! Build with the http://www.ossp.org/pkg/lib/uuid/";>OSSP UUID ! library. This is necessary for the contrib module ! uuid-ossp which provides functions to ! generate UUIDs.UUID --- 937,946 --with-ossp-uuid ! Use the http://www.ossp.org/pkg/lib/uuid/";>OSSP UUID ! library when building /contrib/uuid-ossp. ! The library provides functions to generate ! UUIDs.UUID Index: src/include/pg_config.h.in === RCS file: /cvsroot/pgsql/src/include/pg_config.h.in,v retrieving revision 1.125 diff -c -c -r1.125 pg_config.h.in *** src/include/pg_config.h.in 29 Oct 2007 11:25:42 - 1.125 --- src/include/pg_config.h.in 5 Nov 2007 17:42:12 - *** *** 672,678 /* Define to 1 to build with XML support. (--with-libxml) */ #undef USE_LIBXML ! /* Define to 1 to build with XSLT support. (--with-libxslt) */ #undef USE_LIBXSLT /* Define to select named POSIX semaphores. */ --- 672,679 /* Define to 1 to build with XML support. (--with-libxml) */ #undef USE_LIBXML ! /* Define to 1 to use XSLT support when building /contrib/xml2. !(-
Re: [PATCHES] Consistent \d commands in psql
This has been saved for the 8.4 release: http://momjian.postgresql.org/cgi-bin/pgpatches_hold --- Greg Sabino Mullane wrote: > Attached is an updated version of my psql patch that makes the \d > backslash commands perform in an intuitive, consistent way. > Specifically, the following objects will be treated as first class > citizens (as tables and indexes currently are) by showing all the > non-system objects by default and requiring a "S" to see the system > ones. > > aggregates > conversions > comments > domains > operators > functions > types > > Currently, there is no way to view all the non-system functions in a > database using backslash commands, as you can with \dt, unless all of > the functions happen to be in a single schema ("\df myschema."). With > this patch, it would be as simple as "\df", and the current behavior > would be done with "\dfS". > > This patch also adds a few new things to the tab-completion table, such > as comments and conversions. > > Comments welcome. Last time the patch withered on the vine, despite > strong support from -general, hence I'm going to try again, as I really > want a way to view my functions without querying the pg_proc tables > directly. :) > > -- > Greg Sabino Mullane [EMAIL PROTECTED] > PGP Key: 0x14964AC8 200711042003 > http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 > [ Attachment, skipping... ] > > ---(end of broadcast)--- > TIP 6: explain analyze is your friend -- Bruce Momjian <[EMAIL PROTECTED]>http://momjian.us EnterpriseDB http://postgres.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---(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] ipcclean is excepted by windows.
I would apply this to 8.3 but I am worried it would confuse the Win32 packagers, so I am keeping it for 8.4. This has been saved for the 8.4 release: http://momjian.postgresql.org/cgi-bin/pgpatches_hold --- Hiroshi Saito wrote: > Hi. > > As for windows, unnecessary garbage is processed. > Please apply it. > > Reagrds, > Hiroshi Saito [ Attachment, skipping... ] > > ---(end of broadcast)--- > TIP 6: explain analyze is your friend -- Bruce Momjian <[EMAIL PROTECTED]>http://momjian.us EnterpriseDB http://postgres.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---(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
Re: [PATCHES] Better psql tab-completion support for schemas and tables
This has been saved for the 8.4 release: http://momjian.postgresql.org/cgi-bin/pgpatches_hold --- Greg Sabino Mullane wrote: > (oops, this time with -c, thanks Alvaro) > > Full support for all schema and table name combinations when > getting a list of attributes. All of the following will now work: > > select * from information_schema.columns where > select * from foo where > select * from "user" where > select * from "foo" where > select * from "Uppercase".lower where > select * from "gtsm.com"."foo.Bar" where > select * from "GTSM.com".foo where > > Also applies to other places that get lists of columns: insert into, > alter table, create index, etc. > > -- > Greg Sabino Mullane [EMAIL PROTECTED] > PGP Key: 0x14964AC8 200710211532 > http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 > [ Attachment, skipping... ] > > ---(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 -- Bruce Momjian <[EMAIL PROTECTED]>http://momjian.us EnterpriseDB http://postgres.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: [PATCHES] Adjustment of test_fsync.cf
Patch applied. Yes, open should take three arguments. Thanks. --- Hiroshi Saito wrote: > Hi Bruce-san. > > It is somewhat out of order at MinGW (gcc). > (CVS-HEAD) > > make[1]: Leaving directory > `/home/hiroshi/postgresql-8.3b1-2007-10-18/src/port' > gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline > -Wdeclaration-afterstatement -Wendif-labels > -fno-strict-aliasing -I../../../src/interfaces/libpq -../../../src/include > -I./src/include/port/win32 > -DEXEC_BACKEND "-I../../../srcinclude/port/win32" -c -o test_fsync.o > test_fsync.c > test_fsync.c:75:39: macro "open" requires 3 arguments, but only 2 given > test_fsync.c: In function `main': > test_fsync.c:75: warning: assignment makes integer from pointer without a cast > test_fsync.c:93:39: macro "open" requires 3 arguments, but only 2 given > test_fsync.c:93: warning: assignment makes integer from pointer without a cast > test_fsync.c:100:39: macro "open" requires 3 arguments, but only 2 given > test_fsync.c:100: warning: assignment makes integer from pointer without a > cast > test_fsync.c:114:39: macro "open" requires 3 arguments, but only 2 given > test_fsync.c:114: warning: assignment makes integer from pointer without a > cast > test_fsync.c:120:39: macro "open" requires 3 arguments, but only 2 given > test_fsync.c:120: warning: assignment makes integer from pointer without a > cast > test_fsync.c:172:48: macro "open" requires 3 arguments, but only 2 given > test_fsync.c:172: warning: assignment makes integer from pointer without a > cast > test_fsync.c:222:38: macro "open" requires 3 arguments, but only 2 given > test_fsync.c:222: warning: assignment makes integer from pointer without a > cast > test_fsync.c:242:48: macro "open" requires 3 arguments, but only 2 given > test_fsync.c:242: warning: assignment makes integer from pointer without a > cast > test_fsync.c:303:38: macro "open" requires 3 arguments, but only 2 given > test_fsync.c:303: warning: assignment makes integer from pointer without a > cast > make: *** [test_fsync.o] Error 1 > /END > > Please take this into consideration. > Thanks. > > Regards, > Hiroshi Saito [ Attachment, skipping... ] > > ---(end of broadcast)--- > TIP 5: don't forget to increase your free space map settings -- Bruce Momjian <[EMAIL PROTECTED]>http://momjian.us EnterpriseDB http://postgres.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [PATCHES] [BUGS] BUG #3681: fillers are NULL in pgbench
This has been saved for the 8.4 release: http://momjian.postgresql.org/cgi-bin/pgpatches_hold --- ITAGAKI Takahiro wrote: > > Tom Lane <[EMAIL PROTECTED]> wrote: > > > "ITAGAKI Takahiro" <[EMAIL PROTECTED]> writes: > > > All of filler fields in branches, tellers and history is NULL. It is > > > probabbly a mistake because there are fields of char(22-88) in the table > > > definitions. > > > TPC-B requires at least 100 bytes per row for all tables used in it. > > > > I'm not in favor of changing this. pgbench has never pretended to be > > "really" TPC-B, nor has anyone ever tried to compare its numbers against > > other TPC-B numbers. On the other hand, people *do* compare pgbench > > numbers to itself over time, and if we make a change like this it will > > break comparability of the results. > > Ok, I feel it reasonable. > The attached is a patch to mention it in the source code. > > Regards, > --- > ITAGAKI Takahiro > NTT Open Source Software Center > [ Attachment, skipping... ] > > ---(end of broadcast)--- > TIP 2: Don't 'kill -9' the postmaster -- Bruce Momjian <[EMAIL PROTECTED]>http://momjian.us EnterpriseDB http://postgres.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---(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] Configurable Penalty Costs for Levenshtein
This has been saved for the 8.4 release: http://momjian.postgresql.org/cgi-bin/pgpatches_hold --- Volkan YAZICI wrote: > Hi, > > Following patch implements configurable penalty costs for levenshtein > distance metric in fuzzystrmatch contrib module. > > It doesn't introduce any compatibility issues. Just implements > > levenshtein(text,text,int,int,int) > > function on top of fuzzystrmatch.c:levenshtein_internal(). At the > same time, levenshtein(text,text) becomes just a wrapper for > levenshtein(text,text,1,1,1) call. > > BTW, in current CVS tip > > if (cols/rows == 0) ... > > checks in fuzzyztrmatch.c:levenshtein() never fail because of > > cols/rows = strlen(...) + 1; > > FYI. > > > Regards. Content-Description: Configurable Penalty Costs for Levenshtein > > ---(end of broadcast)--- > TIP 7: You can help support the PostgreSQL project by donating at > > http://www.postgresql.org/about/donate -- Bruce Momjian <[EMAIL PROTECTED]>http://momjian.us EnterpriseDB http://postgres.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [PATCHES] Patch for testing query modes on pgbench
This has been saved for the 8.4 release: http://momjian.postgresql.org/cgi-bin/pgpatches_hold --- ITAGAKI Takahiro wrote: > Here is a patch for testing query modes on pgbench. It is discussed on > http://archives.postgresql.org/pgsql-hackers/2007-10/msg00755.php > > I think this is useful to measure performance of protocols and > prepared statements. I hope the extended protocol will be improved > as fast as the simple protocol. It is 10-20% slower now. > (for 8.4 item) > > The querymode option is added: > -M querymode > Choose the query mode from the follows: > simple: using simple query protocol. > extended: using extended protocol. > prepared: using extended protocol with prepared statements. > default is simple. > > Usage: > $ pgbench -M [simple|extended|prepared] > > Regards, > --- > ITAGAKI Takahiro > NTT Open Source Software Center > [ Attachment, skipping... ] > > ---(end of broadcast)--- > TIP 4: Have you searched our list archives? > >http://archives.postgresql.org -- Bruce Momjian <[EMAIL PROTECTED]>http://momjian.us EnterpriseDB http://postgres.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---(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
Re: [PATCHES] [RFC] extended txid docs
Marko Kreen wrote: > On 10/16/07, Chris Browne <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] ("Marko Kreen") writes: > > > Even the realistic code may be too much for general docs, > > > but considering this is not a functionality covered > > > by general SQL textbooks, I think it is worth having. > > > > > > I also put rendered pages up here: > > > http://skytools.projects.postgresql.org/txid/datatype-txid-snapshot.html > > > > > http://skytools.projects.postgresql.org/txid/functions-txid.html > > > > I believe that those suggested texts describe what you intended, and > > they should represent better English text for this. > > Thanks. Here is a version with your changes applied, plus > minor code cleanup and example output. > > I uploaded full docs to above urls, should be easier to browse. I have applied part of your patch that documents the txid components in the datatype section. I didn't apply any of your example usage. I just added the mention that: The main use of these functions is to determine which transactions were committed between two snapshots. If you want to put those examples on a web site or pgfoundry, we can link to it from the documentation. Applied patch attached. -- Bruce Momjian <[EMAIL PROTECTED]>http://momjian.us EnterpriseDB http://postgres.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + Index: doc/src/sgml/datatype.sgml === RCS file: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v retrieving revision 1.211 diff -c -c -r1.211 datatype.sgml *** doc/src/sgml/datatype.sgml 21 Oct 2007 20:04:37 - 1.211 --- doc/src/sgml/datatype.sgml 5 Nov 2007 14:35:49 - *** *** 3437,3442 --- 3437,3513 + +Transaction Snapshot Type + + + txid_snapshot + + + + The data type txid_snapshot stores info about transaction ID + visibility at a particular moment in time. The components are + described in . + + + + Snapshot components + + + +Name +Query Function +Description + + + + + + +xmin +txid_snapshot_xmin() + + Earliest transaction ID that is still active. All earlier + transactions will either be committed and visible, or rolled + back and dead. + + + + +xmax +txid_snapshot_xmax() + + Next unassigned txid. All txids later than this one are + unassigned, and thus invisible. + + + + +xip_list +txid_snapshot_xip() + + Active txids at the time of snapshot. All of them are between + xmin and xmax. A txid that is xmin <= txid < + xmax and not in this list is visible. + + + + + + + + + Snapshot's textual representation is [xmin]:[xmax]:[xip_list] + for example 10:20:10,14,15 means + xmin=10 xmax=20 xip_list=10,14,15. + + + + Functions for getting and querying transaction ids and snapshots are + described in . + + + UUID Type Index: doc/src/sgml/func.sgml === RCS file: /cvsroot/pgsql/doc/src/sgml/func.sgml,v retrieving revision 1.406 diff -c -c -r1.406 func.sgml *** doc/src/sgml/func.sgml 30 Oct 2007 19:06:56 - 1.406 --- doc/src/sgml/func.sgml 5 Nov 2007 14:35:50 - *** *** 11490,11495 --- 11490,11500 as well. + + + +Transaction ID and Snapshot Functions + txid_current *** *** 11562,11581 ! The internal transaction ID type (xid) is 32 bits wide and so ! it wraps around every 4 billion transactions. However, these functions ! export a 64-bit format that is extended with an epoch counter ! so that it will not wrap around for the life of an installation. ! ! System Administration Functions ! ! shows the functions !available to query and alter run-time configuration parameters. ! Configuration Settings Functions --- 11567,11589 ! The internal transaction ID type (xid) is 32 bits wide and ! so it wraps around every 4 billion transactions. However, these ! functions export a 64-bit format that is extended with an ! epoch counter so that it will not wrap around for the life ! of an installation. The main use of these functions is to determine ! which transactions were committed between two snapshots. + ! !System Administration Functions ! ! shows the functions ! available to query and alter run-time configuration parameters. ! Configuration Settings Functions ---(end of