aboutsummaryrefslogtreecommitdiff
path: root/src/backend
Commit message (Collapse)AuthorAge
...
* Hi,Bruce Momjian2000-03-08
| | | | | | | | | | | | | the to_char() source code is large, here are regression tests for numeric/timestamp/int8 part. It is probably enough test for formatting code in the formatting.c module. The others (float4/float8/int4) types share this formatting code and eventual bugs for these types aren't few probable. Patch fix timestamp_to_char() for infinity/invalid timestamp too. Karel
* Protects you from coredumps if you do eg. str::int4 where str is a textBruce Momjian2000-03-07
| | | | | | | | | field. cf. Tom Lane's <19021.950544016@sss.pgh.pa.us> 14 Feb hackers message. Cheers, Patrick Welche
* I've recently written to pgsql-ports about a problem with PG7.0 on NTBruce Momjian2000-03-07
| | | | | | | | | | | | | (Subj: [PORTS] initdb problem on NT with 7.0). Since nobody helped me, I had to find out the reson. The difference between NT and Linux (for instance) is that "open( path, O_RDWR );" opens a file in text mode. So sometime less block can be read than required. I suggest a following patch. BTW the situation appeared before, see hba.c, pqcomm.c and others. Alexei Zakharov
* Someone (probably me) forgot about handling of typecasts applied toTom Lane2000-03-07
| | | | parameters.
* Sorting for the inet data type randomly returns the wrong resultBruce Momjian2000-03-07
| | | | | | | | | | | | | | | | | | | | | | | | | | when you have networks with the same prefix, but different netmasks. This is due to the fact that occassionally there is random (uninitialized?) data in the extra bits past the point where the netmask cares about them. ie (real data from a real live database): 10.0/10 == 00001010.00100000.00100000.00011000 10.0/11 == 00001010.00000000.00000000.00000000 ^ Bad data, normally never seen The v4bitncmp() function was only taking one bit length argument so it would determine that the networks were different, even though they really aren't (and the netmask test wouldn't be used). This ONLY happens if the tuple with the longer bit length is used as the ip_bits() for the v4bitncmp call AND there happens to be junk data in place in the shorter tuple. Odd and random, but I saw it happen a couple times so... Ryan Mooney
* Apply a MATERIAL node to the result of an uncorrelated subplan, if itTom Lane2000-03-02
| | | | looks like it will save computation to do so.
* Hmm, it seems nodeMaterial has been broken for a good long while;Tom Lane2000-03-02
| | | | closing a relcache entry more times than you open it is not cool.
* equalAttr() had its strcmp test backwards :-(Tom Lane2000-03-01
|
* Small performance improvement in comparetup_heap.Tom Lane2000-03-01
|
* Change reindex command to work properly with gist/hash/rtreeHiroshi Inoue2000-03-01
|
* Simplify parsing of column constraints by treating constraint attributesTom Lane2000-03-01
| | | | | | as independent clauses in the grammar. analyze.c takes care of putting the data where it belongs and complaining about invalid combinations. Also, make TEMP (and TEMPORARY) non-reserved words.
* Remove using puts() to print messages. Instead use TPRINTF.Tatsuo Ishii2000-03-01
|
* Changed execution time of ON <event> RESTRICT referentialJan Wieck2000-02-29
| | | | | | | integrity triggers to after statement allways. Ignores deferred state now, closer to SQL3 semantics. Jan
* Fix comment spacing.Bruce Momjian2000-02-28
|
* Looks like I broke SET variable = DEFAULT awhile ago. Ooops.Tom Lane2000-02-27
|
* Avoid a little bit of unnecessary computation in canonicalize_qual.Tom Lane2000-02-27
|
* Add lztext to TypeCategory so that lztext OP text cases will workTom Lane2000-02-27
| | | | correctly (the lztext value will be promoted to text automatically).
* Reactivated LZTEXT data type and changed rule plan- and qual-stringsJan Wieck2000-02-27
| | | | | | into lztext. Jan
* Minor improvements in regprocout() and oidvectortypes().Tom Lane2000-02-27
|
* Fix poorly worded error messages for unary operator type resolutionTom Lane2000-02-27
| | | | | | | failures. Fix some outright bugs too, including a reference to uninitialized memory that would cause failures like this one: select -('1234567890.1234567'::text); ERROR: Unable to locate type oid 2139062143 in catalog
* Clean up dependencies for version.o.Tom Lane2000-02-27
|
* Add date and time datatype handling to convert_to_scalar. (I was waitingTom Lane2000-02-26
| | | | | for Thomas to do the datetime consolidation before touching this, but it's done now...)
* Change rule dumper to produce reasonable output for casts that assignTom Lane2000-02-26
| | | | | a specific length or precision, such as foo::char(8). Remove erroneous removal of user-written casts at the top level of a SELECT target item.
* Fix exprTypmod to recognize length-coercion function expressions,Tom Lane2000-02-26
| | | | | | | | | | | such as bpchar(char_expression, N), and pull out the attrtypmod that the function is coercing to. This allows correct deduction of the column type in examples such as CREATE VIEW v AS SELECT f1::char(8) FROM tbl; Formerly we labeled v's column as char-of-unknown-length not char(8). Also, this change causes the parser not to insert a redundant length coercion function if the user has explicitly casted an INSERT or UPDATE expression to the right length.
* I had managed to break acceptance of "char", which worked in 6.5 toTom Lane2000-02-26
| | | | refer to the single-byte char type. 7.0 was taking it as bpchar(1).
* Undo a couple of mistaken applications of NameStr() to StringInfos.Tom Lane2000-02-26
| | | | | It worked, because they both have fields named 'data', but it's surely trouble waiting to happen. I wonder whether there are more ...
* Shared-memory hashtables have non-extensible directories, which meansTom Lane2000-02-26
| | | | | | | it's a good idea to choose the directory size based on the expected number of entries. But ShmemInitHash was using a hard-wired constant. Boo hiss. This accounts for recent report of postmaster failure when asking for 64K or more buffers.
* Fix longstanding bug that kept functional indexes from working when youTom Lane2000-02-25
| | | | | | defaulted the opclass. This addresses TODO item * Allow creation of functional indexes to use default types (Does that make it a feature? Oh dear...)
* 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.