summaryrefslogtreecommitdiff
path: root/src/bin/psql/tab-complete.c
AgeCommit message (Collapse)Author
2010-04-07psql tab completion for ALTER DEFAULT PRIVILEGES and USER MAPPING FOR PUBLIC.Itagaki Takahiro
2010-04-05Assorted tab-completion improvements in psql.Itagaki Takahiro
Add missing completions for: - ALTER SEQUENCE name OWNER TO - ALTER TYPE name RENAME TO - ALTER VIEW name ALTER COLUMN - ALTER VIEW name OWNER TO - ALTER VIEW name SET SCHEMA Fix wrong completions for: - ALTER FUNCTION/AGGREGATE name (arguments) ... "(arguments)" has been ignored. - ALTER ... SET SCHEMA "SCHEMA" has been considered as a variable name.
2010-02-26pgindent run for 9.0Bruce Momjian
2010-02-17Support new syntax and improve handling of parentheses in psql tab-completion.Itagaki Takahiro
Newly supported syntax are: - ALTER {TABLE|INDEX|TABLESPACE} {SET|RESET} with options - ALTER TABLE ALTER COLUMN {SET|RESET} with options - ALTER TABLE ALTER COLUMN SET STORAGE - CREATE INDEX CONCURRENTLY - CREATE INDEX ON (without name) - CREATE INDEX ... USING with pg_am.amname instead of hard-corded names - CREATE TRIGGER with events - DROP AGGREGATE function with arguments
2010-02-16Replace the pg_listener-based LISTEN/NOTIFY mechanism with an in-memory queue.Tom Lane
In addition, add support for a "payload" string to be passed along with each notify event. This implementation should be significantly more efficient than the old one, and is also more compatible with Hot Standby usage. There is not yet any facility for HS slaves to receive notifications generated on the master, although such a thing is possible in future. Joachim Wieland, reviewed by Jeff Davis; also hacked on by me.
2010-02-15Add psql tab completion for DO blocks.Itagaki Takahiro
Also adjust documentation of DO. Patch from David Fetter and subsequent discussion.
2010-01-25Add note that PREPARE TRANSACTION is for transaction managers, notHeikki Linnakangas
regular applications. Also add a comment pointing out that tab-complition for PREPARE TRANSACTION is missing on purpose.
2010-01-22Replace ALTER TABLE ... SET STATISTICS DISTINCT with a more general mechanism.Robert Haas
Attributes can now have options, just as relations and tablespaces do, and the reloptions code is used to parse, validate, and store them. For simplicity and because these options are not performance critical, we store them in a separate cache rather than the main relcache. Thanks to Alex Hunsaker for the review.
2010-01-02Add missing schema-qualification in tab completion query.Tom Lane
2010-01-02Update copyright for the year 2010.Bruce Momjian
2009-12-11Add large object access control.Itagaki Takahiro
A new system catalog pg_largeobject_metadata manages ownership and access privileges of large objects. KaiGai Kohei, reviewed by Jaime Casanova.
2009-10-13Add "\pset linestyle ascii/unicode" option to psql, allowing our traditionalTom Lane
ASCII-art style of table output to be upgraded to use Unicode box drawing characters if desired. By default, psql will use the Unicode characters whenever client_encoding is UTF8. The patch forces linestyle=ascii in pg_regress usage, ensuring we don't break the regression tests in Unicode locales. Roger Leigh
2009-10-08Add the new psql command \drds to the psql docs, help and tab completion.Alvaro Herrera
I also thank Bernd Helmle for the documentation help on the previous settings patch, which I forgot on the commit message.
2009-08-02Add ALTER TABLE ... ALTER COLUMN ... SET STATISTICS DISTINCTTom Lane
Robert Haas
2009-06-118.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef listBruce Momjian
provided by Andrew.
2009-04-08Improve tab completion for \ef.Bruce Momjian
Andrew Gierth
2009-04-06Adjust psql tab completion for new \d 'S' flag behavior; adjust code toBruce Momjian
be more flexible about additional modifiers for \d commands.
2009-03-27Fix tab completion of ANALYZE VERBOSE <tab>. It was previously confusedHeikki Linnakangas
with EXPLAIN ANALYZE VERBOSE. Greg Sabino Mullane, reformatted by myself. Backpatch to 8.1, where the bug was introduced.
2009-02-24Add the possibility to specify an explicit validator function for foreign-dataPeter Eisentraut
wrappers (similar to procedural languages). This way we don't need to retain the nearly empty libraries, and we are more free in how to implement the wrapper API in the future.
2009-01-01Update copyright for 2009.Bruce Momjian
2008-12-19SQL/MED catalog manipulation facilitiesPeter Eisentraut
This doesn't do any remote or external things yet, but it gives modules like plproxy and dblink a standardized and future-proof system for managing their connection information. Martin Pihlak and Peter Eisentraut
2008-11-20TABLE commandPeter Eisentraut
2008-11-11Add support for input and output of interval values formatted per ISO 8601;Tom Lane
specifically, we can input either the "format with designators" or the "alternative format", and we can output the former when IntervalStyle is set to iso_8601. Ron Mayer
2008-11-09Add a new GUC variable called "IntervalStyle" that decouples interval outputTom Lane
from DateStyle, and create a new interval style that produces output matching the SQL standard (at least for interval values that fall within the standard's restrictions). IntervalStyle is also used to resolve the conflict between the standard and traditional Postgres rules for interpreting negative interval input. Ron Mayer
2008-11-07Implement ALTER DATABASE SET TABLESPACE to move a whole database (or at leastTom Lane
as much of it as lives in its default tablespace) to a new tablespace. Guillaume Lelarge, with some help from Bernd Helmle and Tom Lane
2008-10-04Implement SQL-standard WITH clauses, including WITH RECURSIVE.Tom Lane
There are some unimplemented aspects: recursive queries must use UNION ALL (should allow UNION too), and we don't have SEARCH or CYCLE clauses. These might or might not get done for 8.4, but even without them it's a pretty useful feature. There are also a couple of small loose ends and definitional quibbles, which I'll send a memo about to pgsql-hackers shortly. But let's land the patch now so we can get on with other development. Yoshiyuki Asaba, with lots of help from Tatsuo Ishii and Tom Lane
2008-09-08Create a separate grantable privilege for TRUNCATE, rather than having it beTom Lane
always owner-only. The TRUNCATE privilege works identically to the DELETE privilege so far as interactions with the rest of the system go. Robert Haas
2008-08-16Fix a couple of places where psql might fail to report a suitable errorTom Lane
if PQexec returns NULL. These don't seem significant enough to be worth back-patching, but they ought to get fixed ...
2008-03-29Improve psql's tab completion to handle completing attribute names in casesTom Lane
where the relation name was schema-qualified, for example UPDATE foo.bar SET <tab> Also support cases where the relation name was quoted unnecessarily, for example UPDATE "foo" SET <tab> Greg Sabino Mullane, slightly simplified by myself.
2008-01-01Update copyrights in source tree to 2008.Bruce Momjian
2007-11-15pgindent run for 8.3.Bruce Momjian
2007-09-14Add tsearch tab completion support:Bruce Momjian
* adds a few missing words to some commands (like adding GIN as a valid index type or OWNED BY for ALTER SEQUENCE,...) * support for ALTER TABLE foo ENABLE/DISABLE REPLICA TRIGGER/RULE * autocomplete CREATE DATABASE foo TEMPLATE (mostly done to prevent conflicts with the TEMPLATE keyword for text search) * support for ALTER/CREATE/DROP TEXT SEARCH as well as COMMENT ON TEXT SEARCH and the corresponding psql backslash commands. This proved a little more difficult than expected due to the fact that words_after_create[] is used for two purposes - one is to provide a list of words that follow immediatly after CREATE (or DROP) and the other purpose is to use it for autocompleting anywhere in the statement if the word in that struct is found with a query. Since TEXT SEARCH CONFIGURATION|DICTIONARY|TEMPLATE|PARSER results in 3 words instead of one (as all the other words in that list are) I added a flag to the struct to tell create_command_generator() to skip that entry for autocompleting immediatly after CREATE which feels like a dirty hack (but that holds true for a lot of code in tab-complete.c). Stefan Kaltenbrunner
2007-07-03Add ALTER VIEW ... RENAME TO, and a RENAME TO clause to ALTER SEQUENCE.Neil Conway
Sequences and views could previously be renamed using ALTER TABLE, but this was a repeated source of confusion for users. Update the docs, and psql tab completion. Patch from David Fetter; various minor fixes by myself.
2007-06-13Schema-qualify several references to the builtin function length(), toNeil Conway
avoid mistakenly calling a function of the same name that might happen to appear earlier in the schema search path.
2007-04-26Another tweak for tab completion of CREATE TEMP. Instead of onlyNeil Conway
completing CREATE { TEMP | TEMPORARY } TABLE, we should also suggest VIEW and SEQUENCE. Per Greg Sabino Mullane.
2007-04-26Minor enhancement to psql tab completion. If we see "CREATE TEMPORARY",Neil Conway
we can complete "TABLE". The previous coding only looked for "CREATE TEMP". Note that I didn't add TEMPORARY to the list of suggested completions after we've seen "CREATE", since TEMP is equivalent and more concise. But if the user has already manually typed TEMPORARY, we may as well complete TABLE for them.
2007-04-26Rename the newly-added commands for discarding session state.Neil Conway
RESET SESSION, RESET PLANS, and RESET TEMP are now DISCARD ALL, DISCARD PLANS, and DISCARD TEMP, respectively. This is to avoid confusion with the pre-existing RESET variants: the DISCARD commands are not actually similar to RESET. Patch from Marko Kreen, with some minor editorialization.
2007-04-08Support syntax "CLUSTER table USING index", which is more logical.Bruce Momjian
Holger Schurig
2007-03-26Allow non-superuser database owners to create procedural languages.Tom Lane
A DBA is allowed to create a language in his database if it's marked "tmpldbacreate" in pg_pltemplate. The factory default is that this is set for all standard trusted languages, but of course a superuser may adjust the settings. In service of this, add the long-foreseen owner column to pg_language; renaming, dropping, and altering owner of a PL now follow normal ownership rules instead of being superuser-only. Jeremy Drake, with some editorialization by Tom Lane.
2007-02-23Add psql \prompt capability.Bruce Momjian
Chad Wagner
2007-02-07Replace some strncpy() by strlcpy().Peter Eisentraut
2007-01-05Update CVS HEAD for 2007 copyright. Back branches are typically notBruce Momjian
back-stamped for this.
2006-10-04pgindent run for 8.2.Bruce Momjian
2006-09-22Fix bugs in plpgsql and ecpg caused by assuming that isspace() would onlyTom Lane
return true for exactly the characters treated as whitespace by their flex scanners. Per report from Victor Snezhko and subsequent investigation. Also fix a passel of unsafe usages of <ctype.h> functions, that is, ye olde char-vs-unsigned-char issue. I won't miss <ctype.h> when we are finally able to stop using it.
2006-07-14Remove 576 references of include files that were not needed.Bruce Momjian
2006-06-11Code review for psql multiline history patch(es). Fix memory leak,Tom Lane
failure to enter commands in history if canceled by control-C, other infelicities.
2006-05-28Remove traces of otherwise unused RELKIND_SPECIAL symbol. Leave the psql bitsAlvaro Herrera
in place though, so that it plays nicely with older servers. Per discussion.
2006-04-30Code review for GRANT CONNECT patch. Spell the privilege as CONNECT notTom Lane
CONNECTION, fix a number of places that were missed (eg pg_dump support), avoid executing an extra search of pg_database during startup.
2006-04-02Add tab-completion for REASSIGN OWNED BY and DROP OWNED BY. Also fix someAlvaro Herrera
whitespace issues nearby. DROP OWNED BY is actually a bit kludgy, but it seems better to do it this way rather than duplicating the words_after_create list just to add a single element.
2006-03-05Update copyright for 2006. Update scripts.Bruce Momjian