summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2005-12-28Mention "table" in "violates foreign key constraint" message that wasBruce Momjian
lacking it. Perhaps it was suppressed because of line length considerations, but "table" should appear.
2005-12-28Remove silly use of DLLIMPORT.Tom Lane
2005-12-28Add COPY CSV test that tests CSV output of \.Bruce Momjian
2005-12-28Add regression tests for CSV and \., and add automatic quoting of aBruce Momjian
single column dump that has a \. value, so the load works properly. I also added documentation describing this issue.
2005-12-28Implement SQL-compliant treatment of row comparisons for < <= > >= casesTom Lane
(previously we only did = and <> correctly). Also, allow row comparisons with any operators that are in btree opclasses, not only those with these specific names. This gets rid of a whole lot of indefensible assumptions about the behavior of particular operators based on their names ... though it's still true that IN and NOT IN expand to "= ANY". The patch adds a RowCompareExpr expression node type, and makes some changes in the representation of ANY/ALL/ROWCOMPARE SubLinks so that they can share code with RowCompareExpr. I have not yet done anything about making RowCompareExpr an indexable operator, but will look at that soon. initdb forced due to changes in stored rules.
2005-12-27Increase amount of shared buffers initdb tries to allocate to 4000,Andrew Dunstan
and add logic to try max_fsm_pages up to 200000, plus accompanying minor docs changes.
2005-12-27Our code had:Bruce Momjian
if (c == '\\' && cstate->line_buf.len == 0) The problem with that is the because of the input and _output_ buffering, cstate->line_buf.len could be zero even if we are not on the first character of a line. In fact, for a typical line, it is zero for all characters on the line. The proper solution is to introduce a boolean, first_char_in_line, that we set as we enter the loop and clear once we process a character. I have restructured the line-reading code in copy.c by: o merging the CSV/non-CSV functions into a single function o used macros to centralize and clarify the buffering code o updated comments o renamed client_encoding_only to encoding_embeds_ascii o added a high-bit test to the encoding_embeds_ascii test for performance o in CSV mode, allow a backslash followed by a non-period to continue being processed as a data value There should be no performance impact from this patch because it is functionally equivalent. If you apply the patch you will see copy.c is much clearer in this area now and might suggest additional optimizations. I have also attached a 8.1-only patch to fix the CSV \. handling bug with no code restructuring.
2005-12-27Protect ADD and HEADER symbols from conflicting with MIPS includes.Bruce Momjian
2005-12-26More uses of IS_HIGHBIT_SET() macro.Bruce Momjian
2005-12-26Rename pg_make_encrypted_password to PQencryptPassword.Peter Eisentraut
2005-12-26Various cosmetic code cleanup for PL/Python:Neil Conway
- use "bool" rather than "int" for boolean variables - use "PLy_malloc" rather than "malloc" in two places - define "PLy_strdup", and use it rather than malloc() + strcpy() in two places (which should have been memcpy(), anyway). - remove a bunch of redundant parentheses from expressions that do not need the parentheses for code clarity
2005-12-25I have added these macros to c.h:Bruce Momjian
#define HIGHBIT (0x80) #define IS_HIGHBIT_SET(ch) ((unsigned char)(ch) & HIGHBIT) and removed CSIGNBIT and mapped it uses to HIGHBIT. I have also added uses for IS_HIGHBIT_SET where appropriate. This change is purely for code clarity.
2005-12-24Previous commit message should have been:Bruce Momjian
Add comment marker for PG_ENCODING_BE_LAST.
2005-12-24AddBruce Momjian
2005-12-24Alignment cleanup.Bruce Momjian
2005-12-24Formatting cleanups.Bruce Momjian
2005-12-24Formatting cleanup.Bruce Momjian
2005-12-24Fix long standing Asian multibyte charsets bug.Tatsuo Ishii
See: Subject: [HACKERS] bugs with certain Asian multibyte charsets From: Tatsuo Ishii <ishii@sraoss.co.jp> To: pgsql-hackers@postgresql.org Date: Sat, 24 Dec 2005 18:25:33 +0900 (JST) for more details/
2005-12-23Wups, fat-fingered the calculation the first time. Update comment inTom Lane
postgresql.conf.sample too.
2005-12-23Fix make_relative_path() to support cases where target_path and bin_pathTom Lane
differ by more than the last directory component. Instead of insisting that they match up to the last component, accept whatever common prefix they have, and try to replace the non-matching part of bin_path with the non-matching part of target_path in the actual executable's path. In one way this is tighter than the old code, because it insists on a match to the part of bin_path we want to substitute for, rather than blindly stripping one directory component from the executable's path. Per gripe from Martin Pitt and subsequent discussion.
2005-12-23Allow CREATE/ALTER ROLE PASSWORD NULL to allow restoring the default statePeter Eisentraut
of having no password.
2005-12-23Fix for rearranging encoding id ISO-8859-5 to ISO-8859-8.Tatsuo Ishii
Also make the code more robust by searching for target encoding in the internal charset map. Problem reported by Sagi Bashari on 2005/12/21. See "[BUGS] BUG #2120: Crash when doing UTF8<->ISO_8859_8 encoding conversion" on pgsql-bugs list for more details.
2005-12-23Add an officially exported libpq function to encrypt passwords, andTom Lane
modify the previous \password patch to use it instead of depending on a not-officially-exported function. Per discussion.
2005-12-23Add quotes around search_path "$user" so that SHOW output can be used inBruce Momjian
SET.
2005-12-22Adjust string comparison so that only bitwise-equal strings are consideredTom Lane
equal: if strcoll claims two strings are equal, check it with strcmp, and sort according to strcmp if not identical. This fixes inconsistent behavior under glibc's hu_HU locale, and probably under some other locales as well. Also, take advantage of the now-well-defined behavior to speed up texteq, textne, bpchareq, bpcharne: they may as well just do a bitwise comparison and not bother with strcoll at all. NOTE: affected databases may need to REINDEX indexes on text columns to be sure they are self-consistent.
2005-12-20Teach planner how to rearrange join order for some classes of OUTER JOIN.Tom Lane
Per my recent proposal. I ended up basing the implementation on the existing mechanism for enforcing valid join orders of IN joins --- the rules for valid outer-join orders are somewhat similar.
2005-12-18Add new psql command \password for changing role password with client-sidePeter Eisentraut
password encryption. Also alter createuser command to the same effect.
2005-12-17Fix typo.Bruce Momjian
2005-12-17Update s_lock.c comments.Bruce Momjian
2005-12-17Update ASM comments.Bruce Momjian
2005-12-16Add a note to Win32 gettimeofday() emulation, per Qingqing Zhou.Alvaro Herrera
2005-12-16Rethink prior patch to filter out dead backend entries from the pgstatsTom Lane
file. The original code probed the PGPROC array separately for each PID, which was not good for large numbers of backends: not only is the runtime O(N^2) but most of it is spent holding ProcArrayLock. Instead, take the lock just once and copy the active PIDs into an array, then use qsort and bsearch so that the lookup time is more like O(N log N).
2005-12-14Defend against crash while processing Describe Statement or Describe PortalTom Lane
messages, when client attempts to execute these outside a transaction (start one) or in a failed transaction (reject message, except for COMMIT/ROLLBACK statements which we can handle). Per report from Francisco Figueiredo Jr.
2005-12-14Fix problem with whole-row Vars referencing sub-select outputs, perTom Lane
example from Jim Dew. Add some simple regression tests, since this is an area we seem to break regularly :-(
2005-12-12Use a proper enum for tri-valued variables.Bruce Momjian
2005-12-12Document tri-valued variables in createdb, +1, -1, 0.Bruce Momjian
2005-12-11Divide the lock manager's shared state into 'partitions', so as toTom Lane
reduce contention for the former single LockMgrLock. Per my recent proposal. I set it up for 16 partitions, but on a pgbench test this gives only a marginal further improvement over 4 partitions --- we need to test more scenarios to choose the number of partitions.
2005-12-11Implement IS NOT DISTINCT FROM, update the regression tests and docs.Neil Conway
Patch from Pavel Stehule, minor fixups by myself.
2005-12-10Teach deparsing of CASE expressions to cope with the simplified formsTom Lane
that simplify_boolean_equality() may leave behind. This is only relevant if the user writes something a bit silly, like CASE x=y WHEN TRUE THEN. Per example from Michael Fuhr; may or may not explain bug #2106.
2005-12-09Allow installation into directories containing spaces in the name.Peter Eisentraut
2005-12-09Fix core dump in error path of plpgsql_parse_tripwordtype. SomebodyTom Lane
introduced a copy-and-pasteo while trying to simplify the code.
2005-12-09Let initdb detect the date order of the lc_time locale and initialize thePeter Eisentraut
datestyle parameter of the new cluster accordingly.
2005-12-09I reconfirmed MS-VC6. Thank you for wonderful correspondence.Bruce Momjian
However, Another problem newly occurred. This solves the problem of snprintf and vsnprintf. Patch to HEAD and 8.1.X. Hiroshi Saito
2005-12-09Stamp libraries for 8.2 by updating minor library version numbers andBruce Momjian
Win32 library files.
2005-12-09Simplify lock manager data structures by making a clear separation betweenTom Lane
the data defining the semantics of a lock method (ie, conflict resolution table and ancillary data, which is all constant) and the hash tables storing the current state. The only thing we give up by this is the ability to use separate hashtables for different lock methods, but there is no need for that anyway. Put some extra fields into the LockMethod definition structs to clean up some other uglinesses, like hard-wired tests for DEFAULT_LOCKMETHOD and USER_LOCKMETHOD. This commit doesn't do anything about the performance issues we were discussing, but it clears away some of the underbrush that's in the way of fixing that.
2005-12-08> 1) I'm proposing a patch to do the DROP FUNCTION argument tab completion.Bruce Momjian
> Now, the arguments of the drop function can be tab completed. for example > > drop function strpos ( > <press tab> > drop FUNCTION strpos (text, text) > > or: > > wsdb=# drop FUNCTION length ( > bit) bytea) character) lseg) path) text) > <press c> > wsdb# DROP FUNCTION length ( character) > > I think that this patch should be rather useful. At it least I hate > always to type all the arguments of the dropped functions. > > 2) Also some fixes applied for the > CREATE INDEX syntax > > now the parenthesises are inserted by tab pressing. > suppose I have the table q3c: Sergey E. Koposov
2005-12-08Add missing translation markerPeter Eisentraut
2005-12-08Fix bgwriter's failure to release buffer pins and open files after anTom Lane
error. This probably explains bug #2099 and could also account for mysterious VACUUM hangups.
2005-12-08Disble some Win32-specific code in win32-client-only builds:Bruce Momjian
I have the problem, when building by MS-VC6. An error occurs in the 8.1.0 present source codes. nmake -f win32.mak ..\..\port\getaddrinfo.c(244) : error C2065: 'WSA_NOT_ENOUGH_MEMORY' ..\..\port\getaddrinfo.c(342) : error C2065: 'WSATYPE_NOT_FOUND' This is used by winsock2.h. However, Construction of a windows base is winsock.h. Then, Since MinGW has special environment, this is right. but, it is not found in VC6. Furthermore, in getaddrinfo.c, IPV6-API is used by LoadLibraryA("ws2_32"); Referring to of dll the external memory generates this violation by VC6 specification. I considered whether the whole should have been converted into winsock2. However, Now, DLL of MinGW creation operates wonderfully as it is. That's right, it has pliability by replacement of simple DLL. Then, I propose the system using winsock(non IPV6) in construction of VC6. Hiroshi Saito
2005-12-08Fix thinko in comment.Tom Lane