Commit Graph

15316 Commits

Author SHA1 Message Date
Bruce Momjian 50e53236af Done:
> * -Add IPv6 capability to INET/CIDR types
2003-06-24 23:05:20 +00:00
Bruce Momjian 7b1f6ffaab Jim C. Nasby wrote:
> Second argument to metaphone is suposed to set the limit on the
> number of characters to return, but it breaks on some phrases:
>
> usps=# select metaphone(a,3),metaphone(a,4),metaphone(a,20) from
> (select 'Hello world'::varchar AS a) a;
> HLW       | HLWR      | HLWRLT
>
> usps=# select metaphone(a,3),metaphone(a,4),metaphone(a,20) from
> (select 'A A COMEAUX MEMORIAL'::varchar AS a) a;
  > AKM       | AKMKS     | AKMKSMMRL
>
> In every case I've found that does this, the 4th and 5th letters are
> always 'KS'.

Nice catch.

There was a bug in the original metaphone algorithm from CPAN. Patch
attached (while I was at it I updated my email address, changed the
copyright to PGDG, and removed an unnecessary palloc). Here's how it
looks now:

regression=# select metaphone(a,4) from (select 'A A COMEAUX
MEMORIAL'::varchar AS a) a;
   metaphone
-----------
   AKMK
(1 row)

regression=# select metaphone(a,5) from (select 'A A COMEAUX
MEMORIAL'::varchar AS a) a;
   metaphone
-----------
   AKMKS
(1 row)

Joe Conway
2003-06-24 22:59:46 +00:00
Bruce Momjian 4b1fe23153 Prevent compiler warning from sprintf in recent ipv6 patch. 2003-06-24 22:42:42 +00:00
Bruce Momjian 945543d919 Add ipv6 address parsing support to 'inet' and 'cidr' data types.
Regression tests for IPv6 operations added.

        Documentation updated to document IPv6 bits.

        Stop treating IPv4 as an "unsigned int" and IPv6 as an array of
        characters.  Instead, always use the array of characters so we
        can have one function fits all.  This makes bitncmp(), addressOK(),
        and several other functions "just work" on both address families.

        add family() function which returns integer 4 or 6 for IPv4 or
        IPv6.  (See examples below)  Note that to add this new function
        you will need to dump/initdb/reload or find the correct magic
        to add the function to the postgresql function catalogs.

        IPv4 addresses always sort before IPv6.

        On disk we use AF_INET for IPv4, and AF_INET+1 for IPv6 addresses.
        This prevents the need for a dump and reload, but lets IPv6 parsing
        work on machines without AF_INET6.

        To select all IPv4 addresses from a table:

                select * from foo where family(addr) = 4 ...

        Order by and other bits should all work.

Michael Graff
2003-06-24 22:21:24 +00:00
Bruce Momjian 4dab978c52 Update:
< * Have SELECT '13 minutes'::interval display zero seconds
> * Have SELECT '13 minutes'::interval display zero seconds in ISO datestyle
2003-06-24 18:45:38 +00:00
Bruce Momjian 975674a952 Add -L../ecpglib -lecpg for Cygwin compile. 2003-06-24 14:45:46 +00:00
Bruce Momjian b235fe3c25 Add:
> * Have SELECT '13 minutes'::interval display zero seconds
2003-06-24 03:42:44 +00:00
Bruce Momjian 2e9632297b Add:
> * Allow the regression tests to start postmaster with -i so the tests
>   can be run on systems that don't support unix-domain sockets
2003-06-24 03:40:09 +00:00
Bruce Momjian c4ac870544 Add:
> * Rename /scripts directory because they are all C programs now
2003-06-24 02:54:23 +00:00
Bruce Momjian 3b2e94de84 Add:
<
> 	o Allow ALTER TABLE to modify column lengths and change to binary
> 	  compatible types
2003-06-24 02:53:36 +00:00
Bruce Momjian 9b2cee0b54 Add:
> * Modify pg_get_triggerdef() to take a boolean to pretty-print,
>  and use that as part of pg_dump along with psql
>
2003-06-24 02:39:49 +00:00
Bruce Momjian f703dee32e Update:
* Allow UPDATE, DELETE to handle table aliases for self-joins [delete]
2003-06-24 01:54:57 +00:00
Bruce Momjian 5249172e1f typedef sa_family_t for cygwin. 2003-06-24 01:49:22 +00:00
Bruce Momjian 94468c6f04 Add:
> 	o Allow columns to be reordered using ALTER ... POSITION i col1 [,col2];
> 	  have SELECT * and INSERT honor such ordering
2003-06-24 01:08:20 +00:00
Bruce Momjian 646e7f8415 Do not include:
#include <pwd.h>
	#include <netdb.h>

in MS CC/Borland builds.
2003-06-24 00:44:29 +00:00
Bruce Momjian 99308891ef Remove references to sa_family_t, except when SOCKADDR_STORAGE requires
it.

Also handle __ss_family as a synonym for ss_family.

Kurt Roeckx
2003-06-23 23:52:00 +00:00
Bruce Momjian 6403a6729c Add with '?':
> * Have initdb set DateStyle based on locale?
2003-06-23 19:33:40 +00:00
Bruce Momjian 3bfabc36b6 Add mention that the grep's have to be adjusted in pgtest. 2003-06-23 19:33:25 +00:00
Bruce Momjian 5c65c94e4f Remove '?':
<   from making invalid dates valid?
>   from making invalid dates valid
2003-06-23 19:22:30 +00:00
Tom Lane ab5c775116 Change pqInternalNotice to accept a format string and args instead of
just a preformatted message; per suggestion by Sean Chittenden.
2003-06-23 19:20:25 +00:00
Bruce Momjian 408625321c Remove crypt.h from fe-connect.c --- not needed, and caused problems on
Solaris with Open SSL version 0.9.7b
2003-06-23 17:03:19 +00:00
Bruce Momjian 9542debae3 Update Russian version of FAQ. 2003-06-23 16:58:21 +00:00
Bruce Momjian 5b106845f9 Add:
> * Exit postmaster if postgresql.conf can not be opened
2003-06-23 04:31:25 +00:00
Bruce Momjian 52001f615e Add:
* Allow SSL-enabled clients to turn off SSL transfers
2003-06-23 04:00:10 +00:00
Bruce Momjian ec5020f0a7 Add:
> * Change CVS $Id$ to $PostgreSQL$
2003-06-23 03:52:24 +00:00
Tom Lane bff0422b6c Revise hash join and hash aggregation code to use the same datatype-
specific hash functions used by hash indexes, rather than the old
not-datatype-aware ComputeHashFunc routine.  This makes it safe to do
hash joining on several datatypes that previously couldn't use hashing.
The sets of datatypes that are hash indexable and hash joinable are now
exactly the same, whereas before each had some that weren't in the other.
2003-06-22 22:04:55 +00:00
Tom Lane 0dda75f6eb Fix some index entries. 2003-06-22 16:17:01 +00:00
Tom Lane a171edf8fc Adjust chapter ordering in Internals part to something that seems more
reasonable.
2003-06-22 16:16:44 +00:00
Michael Meskes 36fe7577f8 Added missing terminating '\0' char for data put into char *. 2003-06-22 11:00:48 +00:00
Tom Lane 14847af48d Remove a lot of desperately obsolete material (which was all out of sight,
out of mind, because it'd been commented out years ago).  Try to bring the
remains up to a reasonable level of currency, and give it all approximately
the same high level of abstraction.
2003-06-22 05:48:26 +00:00
Bruce Momjian 82de7b0a44 Add question mark to item:
<   from making invalid dates valid
>   from making invalid dates valid?
2003-06-22 05:04:52 +00:00
Bruce Momjian 4a49d69c90 Add:
> * Allow current datestyle to restrict dates;  prevent month/day swapping
>   from making invalid dates valid
> * Prevent month/day swapping of ISO dates to make invalid dates valid
2003-06-22 05:01:17 +00:00
Bruce Momjian c1ae39a0cd Add pgtest script. 2003-06-22 04:22:57 +00:00
Tom Lane dd81eee222 Use libpq's new logic to get the server version, instead of doing it ourselves. 2003-06-22 00:56:58 +00:00
Tom Lane e92dc1e199 Bring the libpq example programs into the 21st century. 2003-06-22 00:29:29 +00:00
Tom Lane 21e0b7b8f2 Get rid of extraneous newline in PQendcopy error output (was causing
regression test diffs...).
2003-06-21 23:25:38 +00:00
Tom Lane efc3a25bb0 Update libpq to make new features of FE/BE protocol available to
client applications.  Some editorial work on libpq.sgml, too.
2003-06-21 21:51:35 +00:00
Tom Lane b8d601e735 Fix some markup problems. 2003-06-21 19:33:36 +00:00
Tom Lane 4342e6ea18 Fix for extended-query protocol: in event of error, backend was issuing
a ReadyForQuery (Z message) immediately and then another one after the
Sync message arrives.  Suppress the first one to make it work per spec.
2003-06-20 21:58:02 +00:00
Michael Meskes 94b59faeb7 Synced with backend. 2003-06-20 15:16:06 +00:00
Michael Meskes 2cbaaee6c3 Just another Informix compatibility change. They uses "free" for cursors as wellafter closing them. 2003-06-20 13:36:34 +00:00
Michael Meskes d9b2401d90 Just another ecpg todo done. 2003-06-20 13:20:09 +00:00
Michael Meskes cf5ec3d12b Sorry, missed a file. 2003-06-20 12:01:46 +00:00
Michael Meskes abd310a3b1 Allow constants in using clauses. 2003-06-20 12:00:59 +00:00
Tom Lane 5fc9f3d574 We neglected to set conn->raddr.salen, leading to breakage of CANCEL
and probably other stuff.
2003-06-20 04:09:12 +00:00
Tom Lane 1bd22f55cf Disallow dollar sign in operator names, instead allow it as a non-first
character in identifiers.  The first change eliminates the current need
to put spaces around parameter references, as in "x<=$2".  The second
change improves compatibility with Oracle and some other RDBMSes.  This
was discussed and agreed to back in January, but did not get done.
2003-06-19 23:22:40 +00:00
Michael Meskes 8902aaaa6c Fixed fetch into char * and added missing prototype for an Informix function. 2003-06-19 09:52:11 +00:00
Bruce Momjian 4d9eede82f Move thread checking code farther down in conflgure. 2003-06-18 16:04:15 +00:00
Peter Eisentraut f374a9dae9 Change clusterdb and vacuumdb into C programs. 2003-06-18 12:19:11 +00:00
Tom Lane eab5d643b2 Make FLOAT(p) measure the precision p in bits, not decimal digits, to
match the SQL standard.  Document FLOAT and FLOAT(p) notations in
datatype.sgml.  Per recent pghackers discussion.
2003-06-17 23:12:36 +00:00