summaryrefslogtreecommitdiff
path: root/src/backend/tcop
Commit message (Collapse)AuthorAgeFilesLines
* Second pass over run-time configuration system. Adjust priorities on somePeter Eisentraut2000-06-221-17/+21
| | | | | | | | | | | | | | | | | | | option settings. Sort out SIGHUP vs BACKEND -- there is no total ordering here, so make explicit checks. Add comments explaining all of this. Removed permissions check on SHOW command. Add examine_subclass to the game, rename to SQL_inheritance to fit the official data model better. Adjust documentation. Standalone backend needs to reset all options before it starts. To facilitate that, have IsUnderPostmaster be set by the postmaster itself, don't wait for the magic -p switch. Also make sure that all environment variables and argv's survive init_ps_display(). Use strdup where necessary. Have initdb make configuration files (postgresql.conf, pg_hba.conf) mode 0600 -- having configuration files is no fun if you can't edit them.
* Final #include cleanup.Bruce Momjian2000-06-152-5/+3
|
* Back out pg_shadow changes to allow create table and locking permissions.Bruce Momjian2000-06-121-21/+1
|
* I have large database and with this DB work more users and I very needBruce Momjian2000-06-091-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | more restriction for fretful users. The current PG allow define only NO-CREATE-DB and NO-CREATE-USER restriction, but for some users I need NO-CREATE-TABLE and NO-LOCK-TABLE. This patch add to current code NOCREATETABLE and NOLOCKTABLE feature: CREATE USER username [ WITH [ SYSID uid ] [ PASSWORD 'password' ] ] [ CREATEDB | NOCREATEDB ] [ CREATEUSER | NOCREATEUSER ] -> [ CREATETABLE | NOCREATETABLE ] [ LOCKTABLE | NOLOCKTABLE ] ...etc. If CREATETABLE or LOCKTABLE is not specific in CREATE USER command, as default is set CREATETABLE or LOCKTABLE (true). A user with NOCREATETABLE restriction can't call CREATE TABLE or SELECT INTO commands, only create temp table is allow for him. Karel
* Mark functions as static and ifdef NOT_USED as appropriate.Bruce Momjian2000-06-081-12/+16
|
* Latest round of fmgr updates. All functions with bool,char, or int2Tom Lane2000-06-051-2/+2
| | | | | | | inputs have been converted to newstyle. This should go a long way towards fixing our portability problems with platforms where char and short parameters are passed differently from int-width parameters. Still more to do for the Alpha port however.
* If user re-DECLAREs an existing cursor name, close the old cursor ofTom Lane2000-06-041-8/+24
| | | | | | | that name and issue a NOTICE to the effect that we did. Previously, code would try to assign the new cursor declaration to the old portal, but this didn't work reliably since new parsetree is still sitting in blank portal and is likely to get clobbered.
* New ps display code, works on more platforms.Peter Eisentraut2000-06-043-98/+99
| | | | | | Install a default configuration file. Clean up some funny business in the config file code.
* The heralded `Grand Unified Configuration scheme' (GUC)Peter Eisentraut2000-05-311-182/+120
| | | | | | | | | | | | | That means you can now set your options in either or all of $PGDATA/configuration, some postmaster option (--enable-fsync=off), or set a SET command. The list of options is in backend/utils/misc/guc.c, documentation will be written post haste. pg_options is gone, so is that pq_geqo config file. Also removed were backend -K, -Q, and -T options (no longer applicable, although -d0 does the same as -Q). Added to configure an --enable-syslog option. changed all callers from TPRINTF to elog(DEBUG)
* Ooops, looks like I broke fastpath in last changes...Tom Lane2000-05-301-3/+3
|
* Generated header files parse.h and fmgroids.h are now copied intoTom Lane2000-05-292-20/+6
| | | | | the src/include tree, so that -I backend is no longer necessary anywhere. Also, clean up some bit rot in contrib tree.
* First round of changes for new fmgr interface. fmgr itself and theTom Lane2000-05-282-93/+78
| | | | | | | key call sites are changed, but most called functions are still oldstyle. An exception is that the PL managers are updated (so, for example, NULL handling now behaves as expected in plperl and plpgsql functions). NOTE initdb is forced due to added column in pg_proc.
* Add debug code to aid in memory-leak tracking: if SHOW_MEMORY_STATS isTom Lane2000-05-211-2/+7
| | | | | defined then statistics about memory usage of all the global memory contexts are printed after each commit.
* Fix CLUSTER ... or at least undo the bit-rot it's suffered since 6.5.Tom Lane2000-05-111-4/+1
| | | | | It's still pretty fundamentally bogus :-(. Freebie side benefit: ALTER TABLE RENAME works on indexes now.
* Reset CurrentMemoryContext to TopMemoryContext at the beginning of errorTom Lane2000-04-301-4/+4
| | | | | | | | | | | | cleanup, ie, as soon as we have caught the longjmp. This ensures that current context will be a valid context throughout error cleanup. Before it was possible that current context was pointing at a context that would get deleted during cleanup, leaving any subsequent pallocs in deep trouble. I was able to provoke an Assert failure when compiled with asserts + -DCLOBBER_FREED_MEMORY, if I did something that would cause an error to be reported by the backend large-object code, because indeed that code operates in a context that gets deleted partway through xact abort --- and CurrentMemoryContext was still pointing at it! Boo hiss.
* Setting statistic options from SET PG_OPTIONS caused a backend crashTom Lane2000-04-281-5/+9
| | | | | because StatFp never got set in that case. Set it immediately before use to eliminate such problems.
* change reindex ERROR/NOTICE messageHiroshi Inoue2000-04-251-11/+12
|
* 7.0 buffer manager can support different backends running with differentTom Lane2000-04-231-4/+7
| | | | fsync settings, so the -F option no longer needs to be treated as secure.
* Ye-old pgindent run. Same 4-space tabs.Bruce Momjian2000-04-123-136/+140
|
* Actually, that still wasn't quite right. If we skip a query because ofTom Lane2000-04-041-24/+11
| | | | | | xact abort state in pg_exec_query_dest, we should continue scanning the querytree list, on the off chance that one of the later queries in the string is COMMIT or ROLLBACK.
* Fix bug noted by Bruce: FETCH in an already-aborted transaction blockTom Lane2000-04-042-132/+94
| | | | | | | | | | | would crash, due to premature invocation of SetQuerySnapshot(). Clean up problems with handling of multiple queries by splitting pg_parse_and_plan into two routines. The old code would not, for example, do the right thing with END; SELECT... submitted in one query string when it had been in transaction abort state, because it'd decide to skip planning the SELECT before it had executed the END. New arrangement is simpler and doesn't force caller to plan if only parse+rewrite is needed.
* >> 5. empty define that results in an empty but terminated line ( ; )Bruce Momjian2000-03-231-2/+4
| | | | | | easy (maybe dumb) fix for 5 in attachment define.patch greetings, Andreas
* Remove using puts() to print messages. Instead use TPRINTF.Tatsuo Ishii2000-03-011-4/+4
|
* Change cancel while waiting-for-lock stuff.Hiroshi Inoue2000-02-221-14/+4
|
* fix the TODOHiroshi Inoue2000-02-211-2/+13
| | | | | * Allow PQrequestCancel() to terminate when in waiting-for-lock state Changes are limited to BACKEND,however.
* Reduce proc_exit(1) to proc_exit(0) for errors detected in backendTom Lane2000-02-201-8/+8
| | | | | | 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...
* Get rid of postgres.c's separate parsing logic for PGDATESTYLE env.Tom Lane2000-02-191-27/+5
| | | | | | | | | 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.
* Remove gcc warnings. The Postgres world isn't really safeTom Lane2000-02-191-4/+4
| | | | for 'const' qualifiers yet ...
* Implement reindex commandHiroshi Inoue2000-02-182-4/+68
|
* A few minor psql enhancementsPeter Eisentraut2000-01-291-12/+11
| | | | | | | Initdb help correction Changed end/abort to commit/rollback and changed related notices Commented out way old printing functions in libpq Fixed a typo in alter table / alter column
* Add:Bruce Momjian2000-01-265-11/+16
| | | | | | * Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
* Revise handling of index-type-specific indexscan cost estimation, perTom Lane2000-01-221-7/+10
| | | | | | pghackers discussion of 5-Jan-2000. The amopselect and amopnpages estimators are gone, and in their place is a per-AM amcostestimate procedure (linked to from pg_am, not pg_amop).
* Removed MBFLAGS from makefiles since it's now done in include/config.h.Peter Eisentraut2000-01-191-5/+1
|
* Included all yacc and lex files into the distribution.Peter Eisentraut2000-01-161-19/+39
|
* - Allow array on int8Peter Eisentraut2000-01-151-8/+11
| | | | | | - Prevent permissions on indexes - Instituted --enable-multibyte option and tweaked the MB build process where necessary - initdb prompts for superuser password
* * User management commands no longer user pg_exec_query_dest -> more robustPeter Eisentraut2000-01-141-12/+8
| | | | | | | | | | | | * Let unprivileged users change their own passwords. * The password is now an Sconst in the parser, which better reflects its text datatype and also forces users to quote them. * If your password is NULL you won't be written to the password file, meaning you can't connect until you have a password set up (if you use password authentication). * When you drop a user that owns a database you get an error. The database is not gone.
* Fixed everything in and surrounding createdb and dropdb to make it morePeter Eisentraut2000-01-131-3/+3
| | | | error-proof. Rearranged some old code and removed dead sections.
* Use fmgr_array_args() to avoid dependency on FUNC_MAX_ARGS.Tom Lane2000-01-121-7/+3
|
* More cleanups. Still doesn't work.Bruce Momjian2000-01-111-3/+3
|
* More cleanups.Bruce Momjian2000-01-111-1/+3
|
* Make number of args to a function configurable.Bruce Momjian2000-01-101-6/+6
|
* Rename oid8 -> oidvector and int28 -> int2vector. Cleanup of *out functions.Bruce Momjian2000-01-101-2/+2
|
* Do not start if postmaster is running.Tatsuo Ishii2000-01-091-2/+15
|
* to live in a transaction before access to dbHiroshi Inoue1999-12-221-3/+7
| | | | during backend startup.
* Clean up some minor gcc warnings.Tom Lane1999-12-201-2/+1
|
* Whoever touched this code last doesn't seem to understandTom Lane1999-12-201-6/+3
| | | | what a header file is for :-(
* Here's the Create/Alter/Drop Group stuff that's been really overdue. IBruce Momjian1999-12-161-1/+21
| | | | | | | | | didn't have time for documentation yet, but I'll write some. There are still some things to work out what happens when you alter or drop users, but the group stuff in and by itself is done. -- Peter Eisentraut Sernanders väg 10:115
* Depending on my interpreting (and programming) skills, this might solveBruce Momjian1999-12-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | anywhere from zero to two TODO items. * Allow flag to control COPY input/output of NULLs I got this: COPY table .... [ WITH NULL AS 'string' ] which does what you'd expect. The default is \N, otherwise you can use empty strings, etc. On Copy In this acts like a filter: every data item that looks like 'string' becomes a NULL. Pretty straightforward. This also seems to be related to * Make postgres user have a password by default If I recall this discussion correctly, the problem was actually that the default password for the postgres (or any) user is in fact "\N", because of the way copy is used. With this change, the file pg_pwd is copied out with nulls as empty strings, so if someone doesn't have a password, the password is just '', which one would expect from a new account. I don't think anyone really wants a hard-coded default password. Peter Eisentraut Sernanders väg 10:115
* New LDOUT makefile variable for QNX os.Bruce Momjian1999-12-131-2/+2
|
* Rename several destroy* functions/tags to drop*.Bruce Momjian1999-12-101-8/+8
|