aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt
Commit message (Collapse)AuthorAge
...
* Make SQL arrays support null elements. This commit fixes the core arrayTom Lane2005-11-17
| | | | | | | | functionality, but I still need to make another pass looking at places that incidentally use arrays (such as ACL manipulation) to make sure they are null-safe. Contrib needs work too. I have not changed the behaviors that are still under discussion about array comparison and what to do with lower bounds.
* R-tree is dead ... long live GiST.Tom Lane2005-11-07
|
* Remove a gratuitous string difference (does not affect translations).Peter Eisentraut2005-11-04
|
* Disregard superuserness when checking to see if a role GRANT wouldTom Lane2005-11-04
| | | | | | | | | create circularity of role memberships. This is a minimum-impact fix for the problem reported by Florian Pflug. I thought about removing the superuser_arg test from is_member_of_role() altogether, as it seems redundant for many of the callers --- but not all, and it's way too late in the 8.1 cycle to be making large changes. Perhaps reconsider this later.
* Update a couple of obsolete comments.Tom Lane2005-10-29
|
* Message correctionsPeter Eisentraut2005-10-29
|
* Add comment documenting actual failure case of usingBruce Momjian2005-10-27
| | | | | interval_justify_hours in timestamp subtraction. TODO already has text description.
* Remove justify_hours call from interval_mul and interval_div, and makeTom Lane2005-10-25
| | | | | | | some small stylistic improvements in these functions. Also fix several places where TMODULO() was being used with wrong-sized quotient argument, creating a risk of overflow --- interval2tm was actually capable of going into an infinite loop because of this.
* minor code cleanup - replace useless struct timezone argument toAndrew Dunstan2005-10-22
| | | | | gettimeofday with NULL in a few places, making it consistent with usage elsewhere.
* Adjust not-too-sane calculation of DDD value for to_char(interval).Tom Lane2005-10-20
| | | | Per gripe from Chris Matheson.
* Code review for regexp_replace patch. Improve documentation and comments,Tom Lane2005-10-18
| | | | | | | fix problems with replacement-string backslashes that aren't followed by one of the expected characters, avoid giving the impression that replace_text_regexp() is meant to be called directly as a SQL function, etc.
* Clean up libpq's pollution of application namespace by renaming theTom Lane2005-10-17
| | | | | | exported routines of ip.c, md5.c, and fe-auth.c to begin with 'pg_'. Also get rid of the vestigial fe_setauthsvc/fe_getauthsvc routines altogether.
* Fix thinko in pg_read_file: testing for negative result is not the wayTom Lane2005-10-15
| | | | to determine whether fread() failed.
* Standard pgindent run for 8.1.Bruce Momjian2005-10-15
|
* Allow times of 24:00:00 to match rounding behavior:Bruce Momjian2005-10-14
| | | | | | | | | | | | | | | regression=# select '23:59:59.9'::time(0); time ---------- 24:00:00 (1 row) This is bad because: regression=# select '24:00:00'::time(0); ERROR: date/time field value out of range: "24:00:00" The last example now works.
* Document that get_attstatsslot/free_attstatsslot only need to be passedTom Lane2005-10-11
| | | | | | | | valid type information if they are asked to fetch the values part of a pg_statistic slot; these arguments are unneeded if fetching only the numbers part. Use this to save a catcache lookup in btcostestimate, which is looking like a bit of a hotspot in recent profiling. Not a big savings, but since it's essentially free, might as well do it.
* Fix the problem of GRANTs creating "dangling" privileges not directlyTom Lane2005-10-10
| | | | | | traceable to grant options. As per my earlier proposal, a GRANT made by a role member has to be recorded as being granted by the role that actually holds the grant option, and not the member.
* Fix (hopefully for the last time) problems with datetime values displayingTom Lane2005-10-09
| | | | | | | like '23:59:60' because of fractional-second roundoff problems. Trying to control this upstream of the actual display code was hopeless; the right way is to explicitly round fractional seconds in the display code and then refigure the results if the fraction rounds up to 1. Per bug #1927.
* Marginal performance improvement in aclmask(): don't bother withTom Lane2005-10-07
| | | | | | testing ownership if the caller isn't interested in any GOPTION bits (which is the common case). It did not matter in 8.0 where the ownership test was just a trivial equality test, but it matters now.
* When a function not returning RECORD has a single OUT parameter, useTom Lane2005-10-06
| | | | | | | | the parameter's name (if any) as the default column name for SELECT FROM the function, rather than the function name as previously. I still think this is a bad idea, but I lost the argument. Force decompilation of function RTEs to specify full aliases always, to reduce the odds of this decision breaking dumped views.
* Change nextval and other sequence functions to specify their sequenceTom Lane2005-10-02
| | | | | | | | | | | | | | | argument as a 'regclass' value instead of a text string. The frontend conversion of text string to pg_class OID is now encapsulated as an implicitly-invocable coercion from text to regclass. This provides backwards compatibility to the old behavior when the sequence argument is explicitly typed as 'text'. When the argument is just an unadorned literal string, it will be taken as 'regclass', which means that the stored representation will be an OID. This solves longstanding problems with renaming sequences that are referenced in default expressions, as well as new-in-8.1 problems with renaming such sequences' schemas or moving them to another schema. All per recent discussion. Along the way, fix some rather serious problems in dbmirror's support for mirroring sequence operations (int4 vs int8 confusion for instance).
* Fix confusion between relfilenode and Oid.Alvaro Herrera2005-09-29
| | | | | Also, make pg_total_relation_size include the size of the TOAST index.
* Clean up possibly-uninitialized-variable warnings reported by gcc 4.x.Tom Lane2005-09-24
|
* Suppress signed-vs-unsigned-char warnings.Tom Lane2005-09-24
|
* Rename pg_complete_relation_size() to pg_total_relation_size(), for theNeil Conway2005-09-16
| | | | | | | | | | | | | | sake of brevity and clarity. Make pg_reload_conf(), pg_rotate_logfile(), and pg_cancel_backend() return a boolean rather than an integer to indicate success or failure. Along the way, make some minor cleanups to dbsize.c -- in particular, use elog() rather than ereport() for "shouldn't happen" error conditions, and remove some of the more flagrant violations of the Postgres indentation conventions. Catalog version bumped.
* Update two comments to refer to use the new list API names.Neil Conway2005-09-16
|
* timestamptz_izone should return the input, not NULL, when the inputTom Lane2005-09-09
| | | | | | is a non-finite timestamp, for consistency with related functions. In other words: +infinity rotated to a different timezone is still +infinity.
* Fix the various forms of AT TIME ZONE to accept either timezones foundTom Lane2005-09-09
| | | | | | | | | in the zic database or zone names found in the date token table. This preserves the old ability to do AT TIME ZONE 'PST' along with the new ability to do AT TIME ZONE 'PST8PDT'. Per gripe from Bricklen Anderson. Also, fix some inconsistencies in usage of TZ_STRLEN_MAX --- the old code had the potential for one-byte buffer overruns, though given alignment considerations it's unlikely there was any real risk.
* Fix platform-specific test for path prefix-ness: move it into path.c whereTom Lane2005-08-29
| | | | | it can be done right. Allow explicit use of absolute DataDir path. Per Dave Page.
* The idea of using _strncoll() on Windows doesn't work. Revert to sameTom Lane2005-08-26
| | | | code as we use on other platforms when encoding is not UTF8.
* Factor out the common subexpression month_remainder * DAYS_PER_MONTHTom Lane2005-08-25
| | | | | | | | | in interval_mul and interval_div. This avoids an optimization bug in A Certain Company's compiler (and given their explanation, I wouldn't be surprised if other compilers blow it too). Besides the code seems more clear this way --- in the original formulation, you had to mentally recognize the common subexpression in order to understand what was going on.
* Back out pfrees for justify_hour function calls.Bruce Momjian2005-08-25
|
* Fix memory leak when using justify_hours.Bruce Momjian2005-08-25
|
* Add small hack to support use of Unicode-based locales on WIN32. ThisTom Lane2005-08-24
| | | | | is not adequately tested yet, but let's get it into beta1 so it can be tested. Magnus Hagander and Tom Lane.
* Add hint for to_char(interval) invalid format specifications.Bruce Momjian2005-08-18
|
* Fix to_char(interval) to return proper year and century values.Bruce Momjian2005-08-18
| | | | | | | | Fix to_char(interval) to return large year/month/day/hour values that are larger than possible timestamp values. Prevent to_char(interval) format specifications that make no sense, like Month. Clean up formatting.c code to more logically handle return lengths.
* More formatting.c cleanups.Bruce Momjian2005-08-17
|
* Small cleanup.Bruce Momjian2005-08-17
|
* Adjust to_char/from_char code to use boolean "is_to_char" rather thanBruce Momjian2005-08-17
| | | | integer with flags.
* Rename pg_stat_file columns to be more consistent. Split apart changeBruce Momjian2005-08-15
| | | | and creation columns to behave for Unix or Win32.
* array_in() and array_recv() need to be more paranoid about validatingTom Lane2005-08-15
| | | | | | | | | their OID parameter. It was possible to crash the backend with select array_in('{123}',0,0); because that would bypass the needed step of initializing the workspace. These seem to be the only two places with a problem, though (record_in and record_recv don't have the issue, and the other array functions aren't depending on user-supplied input). Back-patch as far as 7.4; 7.3 does not have the bug.
* Make pg_stat_file() use OUT parameters so that the user doesn't have toTom Lane2005-08-13
| | | | | | | remember the output parameter set for himself. It's a bit of a kluge but fixing array_in to work in bootstrap mode looks worse. I removed the separate pg_file_length() function, as it no longer has any real notational advantage --- you can write (pg_stat_file(...)).length.
* Fix up canonicalize_path to do the right thing in all cases (I think ...Tom Lane2005-08-12
| | | | | this was harder than it seemed at first glance). Also push code for checking for ".." in file names into path.c where it belongs.
* Code & docs review for server instrumentation patch. File timestampsTom Lane2005-08-12
| | | | | | should surely be timestamptz not timestamp; fix some but not all of the holes in check_and_make_absolute(); other minor cleanup. Also put in the missed catversion bump.
* Add files to do read I/O on the cluster directory:Bruce Momjian2005-08-12
| | | | | | | | | | | pg_stat_file() pg_read_file() pg_ls_dir() pg_reload_conf() pg_rotate_logfile() Dave Page Andreas Pflug
* Code and docs review for pg_column_size() patch.Tom Lane2005-08-02
|
* Use ReadDir() not readdir() so as to have some modicum of error checking.Tom Lane2005-08-02
|
* Un-Windows-ify newlines.Tom Lane2005-08-02
|
* Add NOWAIT option to SELECT FOR UPDATE/SHARE.Tom Lane2005-08-01
| | | | | Original patch by Hans-Juergen Schoenig, revisions by Karel Zak and Tom Lane.
* Fix justify_days() for integer datestamp, clean up code.Bruce Momjian2005-07-30
|