aboutsummaryrefslogtreecommitdiff
path: root/src/backend
Commit message (Collapse)AuthorAge
* Fix broken logic for pretty-printing parenthesis-suppression in UNIONTom Lane2004-07-06
| | | | et al.
* Fix unchecked mallocs/strdups added by recent placeholder-config-varsTom Lane2004-07-05
| | | | | | patch. Thomas Hallgren
* Fix no-longer-correct bit-pushing in TransactionIdSetStatus, per Alvaro.Tom Lane2004-07-03
|
* Add missing operators of the form interval-plus-datetime, as required forTom Lane2004-07-02
| | | | | | | | | | | | | better SQL compliance in this area, per recent discussion. Mark related operators as commutators where possible. (The system doesn't actually care about commutator marking for operators not returning boolean, at the moment, but this seems forward-thinking and besides it made it easier to verify that we hadn't missed any.) Also, remove interval-minus-time and interval-minus-timetz operators. I'm not sure how these got in, but they are nonstandard and had very obviously broken behavior. (minus is not commutative in anyone's book.) I doubt anyone had ever used 'em, because we'd surely have gotten a bug report about it if so.
* Andreas Pflug wrote:Joe Conway2004-07-02
| | | | | | | | | | From an idea of Bruce, the attached patch implements the function pg_tablespace_databases(oid) RETURNS SETOF oid which delivers as set of database oids having objects in the selected tablespace, enabling an admin to examine only the databases affecting the tablespace for objects instead of scanning all of them. initdb forced
* Translation updatePeter Eisentraut2004-07-02
|
* More paranoia in AtEOSubXact_SPI: don't assume we can safely use SPI_finishTom Lane2004-07-01
| | | | | | | for cleaning up. It seems possible that the memory contexts SPI_finish would try to touch are already gone; and there's no need for SPI itself to delete them, since the containing contexts will surely be going away anyway at transaction end.
* Further review of xact.c state machine for nested transactions. FixTom Lane2004-07-01
| | | | | problems with starting subtransactions inside already-failed transactions. Clean up some comments.
* Fix seriously nasty memory leak in new TransactionIdIsInProgress code.Tom Lane2004-07-01
|
* Nested transactions. There is still much left to do, especially on theTom Lane2004-07-01
| | | | | | | performance front, but with feature freeze upon us I think it's time to drive a stake in the ground and say that this will be in 7.5. Alvaro Herrera, with some help from Tom Lane.
* Remove some no-longer-needed #includes.Tom Lane2004-06-28
|
* Fix some bogus code in ConstBit production --- it managed to work, butTom Lane2004-06-28
| | | | | | only because 14627 still contained the same node that BitWithoutLength had just produced. Make it more transparent. Also adjust ConstCharacter to be coded the same way for consistency.
* Translation updatesDennis Bjorklund2004-06-27
|
* Adjust pgstat message definitions so that the target message size isTom Lane2004-06-26
| | | | | | specified in just one place and adhered to exactly, rather than just more or less. A side effect is to increase PGSTAT_ACTIVITY_SIZE (maximum reported query length) from 256 to nearly 1000.
* Translation updatesDennis Bjorklund2004-06-26
|
* Support renaming of tablespaces, and changing the owners ofTom Lane2004-06-25
| | | | | | | | aggregates, conversions, functions, operators, operator classes, schemas, types, and tablespaces. Fold the existing implementations of alter domain owner and alter database owner in with these. Christopher Kings-Lynne
* Translation updatesDennis Bjorklund2004-06-25
|
* Add pg_get_serial_sequence() function, and cause pg_dump to use it.Tom Lane2004-06-25
| | | | | | | This eliminates the assumption that a serial column's sequence will have the same name on reload that it was given in the original database. Christopher Kings-Lynne
* #ifdef out file permissions check on SSL key file when on Windows, asTom Lane2004-06-25
| | | | | | we also have done for the data directory permissions check. Dave Page
* Replace direct fprintf(stderr) calls by write_stderr(), and cause thisTom Lane2004-06-24
| | | | | | | routine to do something appropriate on Win32. Also, add a security check on Win32 that parallels the can't-run-as-root check on Unix. Magnus Hagander
* Fix information schema views to return NULL for precision and scale ofTom Lane2004-06-22
| | | | | an unconstrained numeric column. Also, factor out some duplicate code into functions, to ease future maintenance.
* Add comment about rationale for continuing to use C library functionsTom Lane2004-06-21
| | | | instead of src/timezone for timestamping log entries.
* Rename the built-in tablespaces to pg_default and pg_global, and prohibitTom Lane2004-06-21
| | | | | | creation of user-defined tablespaces with names starting with 'pg_', as per suggestion of Chris K-L. Also install admin-guide tablespace documentation from Gavin.
* Rename pg_tablespaces directory to pg_tblspc, so it is more unique fromBruce Momjian2004-06-21
| | | | the pg_tablespace table. Update catalog version.
* Looks like s_lock_test needs <time.h> on some platforms.Tom Lane2004-06-19
|
* s_lock_test requires libpgport to build now.Tom Lane2004-06-19
|
* Fix oversight in recent rowtype-handling improvements: transformTargetListTom Lane2004-06-19
| | | | | | should recognize 'foo.*' when the star appears in A_Indirection, not only in ColumnRef. This allows 'SELECT something.*' to do what the user expects when the something is an expression yielding a row.
* Tablespaces. Alternate database locations are dead, long live tablespaces.Tom Lane2004-06-18
| | | | | | | | | There are various things left to do: contrib dbsize and oid2name modules need work, and so does the documentation. Also someone should think about COMMENT ON TABLESPACE and maybe RENAME TABLESPACE. Also initlocation is dead, it just doesn't know it yet. Gavin Sherry and Tom Lane.
* Represent type-specific length coercion functions as pg_cast entries,Tom Lane2004-06-16
| | | | | | | | | | | | | | | | | eliminating the former hard-wired convention about their names. Allow pg_cast entries to represent both type coercion and length coercion in a single step --- this is represented by a function that takes an extra typmod argument, just like a length coercion function. This nicely merges the type and length coercion mechanisms into something at least a little cleaner than we had before. Make use of the single- coercion-step behavior to fix integer-to-bit coercion so that coercing to bit(n) yields the rightmost n bits of the integer instead of the leftmost n bits. This should fix recurrent complaints about the odd behavior of this coercion. Clean up the documentation of the bit string functions, and try to put it where people might actually find it. Also, get rid of the unreliable heuristics in ruleutils.c about whether to display nested coercion steps; instead require parse_coerce.c to label them properly in the first place.
* Arrange to explicitly stop the pgstat processes at the same time weTom Lane2004-06-14
| | | | | | begin the shutdown checkpoint; there isn't anything left for them to do, so we may as well ensure that they shut down sooner rather than later. Per discussion.
* Give inet/cidr datatypes their own hash function that ignores the inet vsTom Lane2004-06-13
| | | | | | | cidr type bit, the same as network_eq does. This is needed for hash joins and hash aggregation to work correctly on these types. Per bug report from Michael Fuhr, 2004-04-13. Also, improve hash function for int8 as suggested by Greg Stark.
* Translation updatePeter Eisentraut2004-06-13
|
* Code review for recently-added network functions. Get it to work whenTom Lane2004-06-13
| | | | log_hostname is enabled, clean up documentation.
* StrategyDirtyBufferList wasn't being careful to honor max_buffers limit.Tom Lane2004-06-11
| | | | | Bug is only latent given that sole caller is passing NBuffers, but it could bite someone in the rear someday.
* Add some code to Assert that when we release pin on a buffer, we areTom Lane2004-06-11
| | | | | | | not holding the buffer's cntx_lock or io_in_progress_lock. A recent report from Litao Wu makes me wonder whether it is ever possible for us to drop a buffer and forget to release its cntx_lock. The Assert does not fire in the regression tests, but that proves little ...
* >> It certainly doesn't. There still was a bug with the locale stuff,Bruce Momjian2004-06-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >> though - the GUC variable was not set in the child >processes. So "show >> lc_collate" would *always* return "C", for example. attached >patch fixes >> this. > >Hm. Why were these vars not propagated by the regular >mechanism for GUC >variables (write_nondefault_variables or whatever it's called)? If the >problem is that it's not accepting PGC_INTERNAL values, then we need to >fix it there not here, because otherwise we'll have to pass all the >PGC_INTERNAL variables through the backend_variables file, which seems >like a recipe for more of the same sort of bug. Good point :-( I think the problem is not only that it specifically does not deal with PGC_INTERNAL variables. The problem is in the fact that write_nondefault_variables is called *before* the locale is read (because the locale is read from pg_control and not from any of the "usual" ways to read it). Attached patch is another stab at fixing it. It makes postmaster dump a new copy of the file once it has started the database (before it accepts any connections), which is when it will know about these parameters. Also updates the reading code to set the context to the one where the variable was originally set (PGC_POSTMASTER won't work for PGC_INTERNAL, and the other way around). We still pass lc_collate through the special file, because set_config_option on lc_collate will speficially *not* call setlocale(), and we need that call. But we no longer call set_config_option from there. Magnus Hagander
* When using extended-query protocol, postpone planning of unnamed statementsTom Lane2004-06-11
| | | | | | | | | | | | | | | | | | | until Bind is received, so that actual parameter values are visible to the planner. Make use of the parameter values for estimation purposes (but don't fold them into the actual plan). This buys back most of the potential loss of plan quality that ensues from using out-of-line parameters instead of putting literal values right into the query text. This patch creates a notion of constant-folding expressions 'for estimation purposes only', in which case we can be more aggressive than the normal eval_const_expressions() logic can be. Right now the only difference in behavior is inserting bound values for Params, but it will be interesting to look at other possibilities. One that we've seen come up repeatedly is reducing now() and related functions to current values, so that queries like ... WHERE timestampcol > now() - '1 day' have some chance of being planned effectively. Oliver Jowett, with some kibitzing from Tom Lane.
* Attached is a patch that takes care of the PATHSEP issue. I made a moreBruce Momjian2004-06-10
| | | | | | | | | | | | | | | | | | | extensive change then what was suggested. I found the file path.c that contained a lot of "Unix/Windows" agnostic functions so I added a function there instead and removed the PATHSEP declaration in exec.c altogether. All to keep things from scattering all over the code. I also took the liberty of changing the name of the functions "first_path_sep" and "last_path_sep". Where I come from (and I'm apparently not alone given the former macro name PATHSEP), they should be called "first_dir_sep" and "last_dir_sep". The new function I introduced, that actually finds path separators, is now the "first_path_sep". The patch contains changes on all affected places of course. I also changed the documentation on dynamic_library_path to reflect the chagnes. Thomas Hallgren
* Adjust cost_nonsequential_access() to have more reasonable behaviorTom Lane2004-06-10
| | | | | when random_page_cost has a small value. Per Manfred Koizar, though I didn't use his equation exactly.
* Make ALTER TABLE ADD SERIAL work reasonably in inheritance cases, too.Tom Lane2004-06-10
|
* Fix oversight in recent ALTER TABLE improvements. We now supportTom Lane2004-06-10
| | | | | | ALTER TABLE tab ADD COLUMN col SERIAL, but we forgot to install the dependency between the column and the sequence, so the sequence would not go away if you dropped the table later.
* Clean up generation of default names for constraints, indexes, and serialTom Lane2004-06-10
| | | | | | | | sequences, as per recent discussion. All these names are now of the form table_column_type, with digits added if needed to make them unique. Default constraint names are chosen to be unique across their whole schema, not just within the parent object, so as to be more SQL-spec-compatible and make the information schema views more useful.
* Translation updatePeter Eisentraut2004-06-10
|
* New translationPeter Eisentraut2004-06-10
|
* Fix slightly-wrong syntax error messages from bootstrap parser, as perTom Lane2004-06-09
| | | | report from Tom Cook.
* Support assignment to subfields of composite columns in UPDATE and INSERT.Tom Lane2004-06-09
| | | | | | | | As a side effect, cause subscripts in INSERT targetlists to do something more or less sensible; previously we evaluated such subscripts and then effectively ignored them. Another side effect is that UPDATE-ing an element or slice of an array value that is NULL now produces a non-null result, namely an array containing just the assigned-to positions.
* Previous code cleanup was for bufpage.c, not bufmgr.c.Bruce Momjian2004-06-09
| | | | This cleanup just cleans up a comment.
* Add missing check for too-few-inputs when replacing a zero-dimensionalTom Lane2004-06-08
| | | | array.
* Stylistic changes in bufmgr.cBruce Momjian2004-06-08
| | | | | | | Basically replaces (*a).b with a->b as it is everywhere else in Postgres. Manfred Koizar
* vacuum.c refactoringBruce Momjian2004-06-08
| | | | | | | | | | | | | | | | | . rename variables . cur_buffer -> dst_buffer . ToPage -> dst_page . cur_page -> dst_vacpage . move variable declarations into block where variable is used . various Asserts instead of elog(ERROR, ...) . extract functionality from repair_frag() into new routines . move_chain_tuple() . move_plain_tuple() . update_hint_bits() . create type ExecContext . add comments Manfred Koizar