aboutsummaryrefslogtreecommitdiff
path: root/src/backend
Commit message (Collapse)AuthorAge
...
* Suppress timespan and datetime ops from being brought in via pg_dumpBruce Momjian2000-02-24
| | | | from previous release.
* Check pending cancel request before waiting for lockHiroshi Inoue2000-02-24
|
* Add the check CommonSpecialPortal in use(my fault)Hiroshi Inoue2000-02-24
|
* Add numeric <-> int8 and numeric <-> int2 conversion functions, as wellTom Lane2000-02-24
| | | | | | | | | | as a unary minus operator for numeric. Now that long numeric constants will get converted to NUMERIC in early parsing, it's essential to have numeric->int8 conversion to avoid 'can't convert' errors on undecorated int8 constants. Threw in the rest for completeness while I was in the area. I did not force an initdb for this, since the system will still run without the new pg_proc/pg_operator entries. Possibly I should've.
* Make make_const() check the size and precision of a T_Float Value,Tom Lane2000-02-24
| | | | | | | | and produce either FLOAT8 or NUMERIC output depending on whether the value fits in a float8 or not. This is almost back to the way the code was before I changed T_Float, but there is a critical difference: now, when a numeric constant doesn't fit in float8, it will be treated as type NUMERIC instead of type UNKNOWN.
* int8in failed to detect overflow; it really should.Tom Lane2000-02-24
|
* Change cancel while waiting-for-lock stuff.Hiroshi Inoue2000-02-22
|
* First post-beta1 bug fix :-(. Silly typo in new coding for doNegateTom Lane2000-02-22
| | | | | failed to negate a negative value back to positive, so '- - 123.45' did the wrong thing.
* Quick hack solution so that pg_dump of views works. Needs repair afterTom Lane2000-02-21
| | | | Thomas gets back, but better this than nonfunctional pg_dump in the beta.
* Oops, commited a test version of this file by accident. Revert.Tom Lane2000-02-21
|
* Change parse-time representation of float literals (which include oversizeTom Lane2000-02-21
| | | | | | | | integers) to be strings instead of 'double'. We convert from string form to internal representation only after type resolution has determined the correct type for the constant. This eliminates loss-of-precision worries and gets rid of the change in behavior seen at 17 digits with the previous kluge.
* Fix "Invalid XID in t_cmin" error in vacuum.Hiroshi Inoue2000-02-21
|
* Clean up some really grotty coding in catcache.c, improve hashingTom Lane2000-02-21
| | | | performance in catcache lookups.
* fix the TODOHiroshi Inoue2000-02-21
| | | | | * Allow PQrequestCancel() to terminate when in waiting-for-lock state Changes are limited to BACKEND,however.
* Tweak planner to use OFFSET+LIMIT, not just LIMIT, as estimate of theTom Lane2000-02-21
| | | | | | | portion of the query result that will be retrieved. As far as I could tell, the consensus was that we should let the planner do the best it can with a LIMIT query, and require the user to add ORDER BY if he wants consistent results from different LIMIT values.
* Further cleanups for type coercion: treat the locution typename(argument)Tom Lane2000-02-20
| | | | | | | as representing a type coercion request in more cases than we did before. It will work now whenever no underlying function is required, ie if the coercion is binary-compatible or if the argument is a previously untyped string constant. Otherwise, you still need a real function to exist.
* Create a new expression node type RelabelType, which exists solely toTom Lane2000-02-20
| | | | | | | | | | represent the result of a binary-compatible type coercion. At runtime it just evaluates its argument --- but during type resolution, exprType will pick up the output type of the RelabelType node instead of the type of the argument. This solves some longstanding problems with dropped type coercions, an example being 'select now()::abstime::int4' which used to produce date-formatted output, not an integer, because the coercion to int4 was dropped on the floor.
* Fix broken list-slinging logic in func_select_candidate andTom Lane2000-02-20
| | | | | | | | | | | agg_select_candidate, which could cause them to keep more candidates than they should and thus fail to select a single match. I had previously fixed the identical bug in oper_select_candidate, but didn't realize that the same error was repeated over here. Also, repair func_select_candidate's curious notion that it could scribble on the input type-OID vector. That was causing failure to apply necessary type coercion later on, leading to malfunction of examples such as select date('now').
* Even after the great date/time consolidation, TypeCategory() was stillTom Lane2000-02-20
| | | | | | | | | a few bricks shy of a load concerning knowing all the date/time types. This is real bad because it interferes with func_select_candidate()'s willingness to disambiguate functions --- func_select_candidate() will punt unless all the available choices have the same type category. I think this whole mechanism needs redesigned, but in the meantime this is a needed patch.
* Reduce proc_exit(1) to proc_exit(0) for errors detected in backendTom Lane2000-02-20
| | | | | | command line processing. As it stood, a bogus PGOPTIONS value from a client would force a database system restart. Not bad as a denial- of-service attack...
* Fix SERIAL columns, which Thomas inadvertently broke parsing of.Tom Lane2000-02-20
| | | | | Revised code probably accepts some silly combinations, but that's better than not accepting valid ones.
* Repair longstanding violation of SQL92 semantics: GROUP BY wouldTom Lane2000-02-19
| | | | | | | | | | | | | | interpret a column name as an output column alias (targetlist AS name), ather than a real column name as it ought to. According to the spec, only ORDER BY should look at output column names. I left in GROUP BY's willingness to use an output column number ('GROUP BY 2'), even though this is also contrary to the spec --- again, only ORDER BY is supposed to accept that. But there is no possible reason to want to GROUP BY an integer constant, so keeping this old behavior won't break any SQL-compliant queries. DISTINCT ON will behave the same as GROUP BY. Change numerology regress test, which depended on the incorrect behavior.
* Get rid of postgres.c's separate parsing logic for PGDATESTYLE env.Tom Lane2000-02-19
| | | | | | | | | variable, instead calling same code in variable.c that is used to parse SET DATESTYLE. Fix bug: although backend's startup datestyle had been changed to ISO, 'RESET DATESTYLE' and 'SET DATESTYLE TO DEFAULT' didn't know about it. For consistency I have made the latter two reset to the PGDATESTYLE-defined initial value, which may not be the same as the compiled-in default of ISO.
* Accept the noise-word ALL in aggregate function invocations for SQL92Tom Lane2000-02-19
| | | | compliance. Wish they were all that easy...
* First workaround solution for Jan's column constraint attributes.Thomas G. Lockhart2000-02-19
|
* Clean up scan.l's handling of \r vs \n --- they are reliably treated asTom Lane2000-02-19
| | | | | | equivalent now, which should make Windows and Mac clients happier. Also fix failure to handle SQL comments between segments of a multiline quoted literal.
* Remove gcc warnings. The Postgres world isn't really safeTom Lane2000-02-19
| | | | for 'const' qualifiers yet ...
* Plug some more memory leaks in the planner. It still leaks like a sieve,Tom Lane2000-02-18
| | | | but this is as good as it'll get for this release...
* Implement reindex commandHiroshi Inoue2000-02-18
|
* Replace inefficient _bt_invokestrat calls with direct calls to theTom Lane2000-02-18
| | | | | | | appropriate btree three-way comparison routine. Not clear why the three-way comparison routines were being used in some paths and not others in btree --- incomplete changes by someone long ago, maybe? Anyway, this makes for a nice speedup in CREATE INDEX.
* Fix assert bug(was my fault)Hiroshi Inoue2000-02-17
|
* Finish repairing 6.5's problems with r-tree indexes: create appropriateTom Lane2000-02-17
| | | | | | | | | | | | selectivity functions and make the r-tree operators use them. The estimation functions themselves are just stubs, unfortunately, but perhaps someday someone will make them compute realistic estimates. Change pg_am so that the optimizer can reliably tell the difference between ordered and unordered indexes --- before it would think that an r-tree index can be scanned in '<<' order, which is not right AFAIK. Repair broken negator links for network_sup and related ops. Initdb forced. This might be my last initdb force for 7.0 ... hope so anyway ...
* All regression tests pass except for rules.sql (unrelated).Thomas G. Lockhart2000-02-16
| | | | | | | | | | | | | | Implement "date/time grand unification". Transform datetime and timespan into timestamp and interval. Deprecate datetime and timespan, though translate to new types in gram.y. Transform all datetime and timespan catalog entries into new types. Make "INTERVAL" reserved word allowed as a column identifier in gram.y. Remove dt.h, dt.c files, and retarget datetime.h, datetime.c as utility routines for all date/time types. date.{h,c} now deals with date, time types. timestamp.{h,c} now deals with timestamp, interval types. nabstime.{h,c} now deals with abstime, reltime, tinterval types. Make NUMERIC a known native type for purposes of type coersion. Not tested.
* Implement "date/time grand unification".Thomas G. Lockhart2000-02-16
| | | | | | | | | | | | | Transform datetime and timespan into timestamp and interval. Deprecate datetime and timespan, though translate to new types in gram.y. Transform all datetime and timespan catalog entries into new types. Make "INTERVAL" reserved word allowed as a column identifier in gram.y. Remove dt.h, dt.c files, and retarget datetime.h, datetime.c as utility routines for all date/time types. date.{h,c} now deals with date, time types. timestamp.{h,c} now deals with timestamp, interval types. nabstime.{h,c} now deals with abstime, reltime, tinterval types. Make NUMERIC a known native type for purposes of type coersion. Not tested.
* Make ISO date style (e.g. "2000-02-16 09:33") the default.Thomas G. Lockhart2000-02-16
| | | | | | | | | | | | | | Implement "date/time grand unification". Transform datetime and timespan into timestamp and interval. Deprecate datetime and timespan, though translate to new types in gram.y. Transform all datetime and timespan catalog entries into new types. Make "INTERVAL" reserved word allowed as a column identifier in gram.y. Remove dt.h, dt.c files, and retarget datetime.h, datetime.c as utility routines for all date/time types. date.{h,c} now deals with date, time types. timestamp.{h,c} now deals with timestamp, interval types. nabstime.{h,c} now deals with abstime, reltime, tinterval types. Make NUMERIC a known native type for purposes of type coersion. Not tested.
* If we don't have any stats for a boolean column, assumeTom Lane2000-02-16
| | | | the disbursion is 0.5, not something small.
* Make eqsel produce better results for boolean columns,Tom Lane2000-02-16
| | | | | and make scalarltsel a little more forgiving at the boundaries of the known range of a column value.
* Remove long-dead code.Tom Lane2000-02-15
|
* Fix missing lfirst() in ListTableAsAttrs(). This codeTom Lane2000-02-15
| | | | doesn't seem to be used at the moment, but as long as I'm looking at it...
* New cost model for planning, incorporating a penalty for random pageTom Lane2000-02-15
| | | | | | | | | | | | | | | | | | | | | | | | | accesses versus sequential accesses, a (very crude) estimate of the effects of caching on random page accesses, and cost to evaluate WHERE- clause expressions. Export critical parameters for this model as SET variables. Also, create SET variables for the planner's enable flags (enable_seqscan, enable_indexscan, etc) so that these can be controlled more conveniently than via PGOPTIONS. Planner now estimates both startup cost (cost before retrieving first tuple) and total cost of each path, so it can optimize queries with LIMIT on a reasonable basis by interpolating between these costs. Same facility is a win for EXISTS(...) subqueries and some other cases. Redesign pathkey representation to achieve a major speedup in planning (I saw as much as 5X on a 10-way join); also minor changes in planner to reduce memory consumption by recycling discarded Path nodes and not constructing unnecessary lists. Minor cleanups to display more-plausible costs in some cases in EXPLAIN output. Initdb forced by change in interface to index cost estimation functions.
* Silence gcc warning about uninitialized var.Tom Lane2000-02-15
|
* Removed unused var to silence gcc warning.Tom Lane2000-02-15
|
* Repair bogus rule display of attr lists.Tom Lane2000-02-15
|
* Remove some // comments, which are not ANSI C last I heard.Tom Lane2000-02-15
|
* Carry column aliases from the parser frontend. Enables queries likeThomas G. Lockhart2000-02-15
| | | | | | | SELECT a FROM t1 tx (a); Allow join syntax, including queries like SELECT * FROM t1 NATURAL JOIN t2; Update RTE structure to hold column aliases in an Attr structure.
* Add "DEC" as synonym for "DECIMAL".Thomas G. Lockhart2000-02-15
| | | | | | Add "SESSION_USER" as SQL92 keyword; equivalent to CURRENT_USER for now. Implement column aliases (aka correlation names) and more join syntax. Fix up indenting and tabbing.
* Recognize special case of POSIX time zone: "GMT+8" and "GMT-8".Thomas G. Lockhart2000-02-15
| | | | | | Still needs to be done for the general case: "tz+/-#" where tz is a 3 char string. This will probably involve moving code around to other places.
* Fix up error and log messages.Thomas G. Lockhart2000-02-15
|
* contrib-array.patchBruce Momjian2000-02-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this is an old patch which I have already submitted and never seen in the sources. It corrects the datatype oids used in some iterator functions. This bug has been reported to me by many other people. contrib-datetime.patch some code contributed by Reiner Dassing <dassing@wettzell.ifag.de> contrib-makefiles.patch fixes all my contrib makefiles which don't work with some compilers, as reported to me by another user. contrib-miscutil.patch an old patch for one of my old contribs. contrib-string.patch a small change to the c-like text output functions. Now the '{' is escaped only at the beginning of the string to distinguish it from arrays, and the '}' is no more escaped. elog-lineno.patch adds the current lineno of CopyFrom to elog messages. This is very useful when you load a 1 million tuples table from an external file and there is a bad value somehere. Currently you get an error message but you can't know where is the bad data. The patch uses a variable which was declared static in copy.c. The variable is now exported and initialized to 0. It is always cleared at the end of the copy or at the first elog message or when the copy is canceled. I know this is very ugly but I can't find any better way of knowing where the copy fails and I have this problem quite often. plperl-makefile.patch fixes a typo in a makefile, but the error must be elsewhere because it is a file generated automatically. Please have a look. tprintf-timestamp.patch restores the original 2-digit year format, assuming that the two century digits don't carry much information and that '000202' is easier to read than 20000202. Being only a log file it shouldn't break anything. Please apply the patches before the next scheduled code freeze. I also noticed that some of the contribs don't compile correcly. Should we ask people to fix their code or rename their makefiles so that they are ignored by the top makefile? -- Massimo Dal Zotto
* 2. trigger.c fails to compile due to a syntax error. It containsBruce Momjian2000-02-13
| | | | | | | | | | | | | | a switch statement that has an empty default label. A label of a switch statement must be followed by a statement (or a label which is followed by a statement (or a label which ...)). 3. Files include stringinfo.h failed to compile. The macro, 'appendStringInfoCharMacro' is implemented with a '?:' operation that returns a void expression for the true part and a char expresion for the false part. Both the true and false parts of the '?:' oper- ator must return the same type. Billy G. Allie