summaryrefslogtreecommitdiff
path: root/src/bin/psql/tab-complete.c
AgeCommit message (Collapse)Author
2012-07-05Fix function argument tab completion for schema-qualified or quoted function ↵Magnus Hagander
names Dean Rasheed, reviewed by Josh Kupershmidt
2012-06-10Run pgindent on 9.2 source tree in preparation for first 9.3Bruce Momjian
commit-fest.
2012-05-08psql: Add variable to control keyword case in tab completionPeter Eisentraut
This adds the variable COMP_KEYWORD_CASE, which controls in what case keywords are completed. This is partially to let users configure the change from commit 69f4f1c3576abc535871c6cfa95539e32a36120f, but it also offers more behaviors than were available before.
2012-04-26psql: Tab completion updatesPeter Eisentraut
Add/complete support for: - ALTER DOMAIN / VALIDATE CONSTRAINT - ALTER DOMAIN / RENAME - ALTER DOMAIN / RENAME CONSTRAINT - ALTER TABLE / RENAME CONSTRAINT
2012-04-18psql: Add tab completion for CREATE/ALTER ROLE name WITHPeter Eisentraut
Previously, the use of the optional key word WITH was not supported. Josh Kupershmidt
2012-04-10psql: Improve tab completion of WITHPeter Eisentraut
Only match when WITH is the first word, as WITH may appear in many other contexts. Josh Kupershmidt
2012-04-06Allow statistics to be collected for foreign tables.Tom Lane
ANALYZE now accepts foreign tables and allows the table's FDW to control how the sample rows are collected. (But only manual ANALYZEs will touch foreign tables, for the moment, since among other things it's not very clear how to handle remote permissions checks in an auto-analyze.) contrib/file_fdw is extended to support this. Etsuro Fujita, reviewed by Shigeru Hanada, some further tweaking by me.
2012-03-31Fix glitch recently introduced in psql tab completion.Tom Lane
Over-optimization (by me, looks like :-() broke the case of recognizing a word boundary just before a quoted identifier. Reported and diagnosed by Dean Rasheed.
2012-02-28psql: when tab-completing, use quotes on file names that need themAlvaro Herrera
psql backslash commands that deal with file or directory names require quotes around those that have spaces, single quotes, or backslashes. However, tab-completing such names does not provide said quotes, and is thus almost useless with them. This patch fixes the problem by having a wrapper function around rl_filename_completion_function that dequotes on input and quotes on output. This eases dealing with such names. Author: Noah Misch
2012-02-01psql: Case preserving completion of SQL key wordsPeter Eisentraut
Instead of always completing SQL key words in upper case, look at the word being completed and match the case. reviewed by Fujii Masao
2012-01-31psql: Reduce the amount of const lies a bitPeter Eisentraut
2012-01-21psql: Add support for tab completion of GRANT/REVOKE rolePeter Eisentraut
Previously, only GRANT/REVOKE privilege was supported. reviewed by Pavel Stehule
2012-01-01Update copyright notices for year 2012.Bruce Momjian
2011-12-27Standardize treatment of strcmp() return valuePeter Eisentraut
Always compare the return value to 0, don't use cute tricks like if (!strcmp(...)).
2011-12-20Add support for privileges on typesPeter Eisentraut
This adds support for the more or less SQL-conforming USAGE privilege on types and domains. The intent is to be able restrict which users can create dependencies on types, which restricts the way in which owners can alter types. reviewed by Yeb Havinga
2011-10-24Make TABLE tab complation in psql include all relationsMagnus Hagander
Not just tables, since views also work fine with the TABLE command.
2011-10-23Make psql support tab completion of EXECUTE <prepared-statement-name>.Tom Lane
Andreas Karlsson, reviewed by Josh Kupershmidt
2011-10-20Rewrite tab completion's previous-word fetching for more sanity.Tom Lane
Make it return empty strings when there are no more words to the left of the current position, instead of sometimes returning NULL and other times returning copies of the leftmost word. Also, fetch the words in one scan, rather than the previous wasteful approach of starting from scratch for each word. Make the code a bit harder to break when someone decides we need more words of context, too. (There was actually a memory leak here, because whoever added prev6_wd neglected to free it.)
2011-07-06Add \ir command to psql.Robert Haas
\ir is short for "include relative"; when used from a script, the supplied pathname will be interpreted relative to the input file, rather than to the current working directory. Gurjeet Singh, reviewed by Josh Kupershmidt, with substantial further cleanup by me.
2011-06-14Allow psql \d tab completion to complete all relation kindsPeter Eisentraut
This matches what \d actually accepts.
2011-06-11Tab completion improvements for COMMENT.Robert Haas
These pertain to object types introduced in PostgreSQL 9.1, so back-patch. Josh Kupershmidt, with some kibitzing by me.
2011-05-13More cleanup of FOREIGN TABLE permissions handling.Robert Haas
This commit fixes psql, pg_dump, and the information schema to be consistent with the backend changes which I made as part of commit be90032e0d1cf473bdd99aee94218218f59f29f1, and also includes a related documentation tweak. Shigeru Hanada, with slight adjustment.
2011-04-10pgindent run before PG 9.1 beta 1.Bruce Momjian
2011-04-01Tab completion for COMMENT ON FOREIGN DATA WRAPPER / SERVER.Robert Haas
2011-03-16Tab completion for \pset format and \pset linestyle.Robert Haas
Pavel Stehule
2011-03-11Create an explicit concept of collations that work for any encoding.Tom Lane
Use collencoding = -1 to represent such a collation in pg_collation. We need this to make the "default" entry work sanely, and a later patch will fix the C/POSIX entries to be represented this way instead of duplicating them across all encodings. All lookup operations now search first for an entry that's database-encoding-specific, and then for the same name with collencoding = -1. Also some incidental code cleanup in collationcmds.c and pg_collation.c.
2011-03-03Add tab-completion for table name after JOIN.Heikki Linnakangas
Andrey Popp
2011-02-24More psql tab-completion for new commands.Itagaki Takahiro
- ALTER FOREIGN DATA WRAPPER with HANDLER - ALTER TABLE VALIDATE CONSTRAINT - ALTER TYPE ADD VALUE - COPY with ENCODING and FORCE NOT NULL - CREATE FOREIGN DATA WRAPPER with HANDLER - CREATE TRIGGER ... INSTEAD OF
2011-02-24Add tab-completion for CREATE UNLOGGED TABLE in psql,Itagaki Takahiro
and fix unexpected completion for DROP TEMP and UNIQUE.
2011-02-14Rearrange extension-related views as per recent discussion.Tom Lane
The original design of pg_available_extensions did not consider the possibility of version-specific control files. Split it into two views: pg_available_extensions shows information that is generic about an extension, while pg_available_extension_versions shows all available versions together with information that could be version-dependent. Also, add an SRF pg_extension_update_paths() to assist in checking that a collection of update scripts provide sane update path sequences.
2011-02-12DDL support for collationsPeter Eisentraut
- collowner field - CREATE COLLATION - ALTER COLLATION - DROP COLLATION - COMMENT ON COLLATION - integration with extensions - pg_dump support for the above - dependency management - psql tab completion - psql \dO command
2011-02-11Add support for multiple versions of an extension and ALTER EXTENSION UPDATE.Tom Lane
This follows recent discussions, so it's quite a bit different from Dimitri's original. There will probably be more changes once we get a bit of experience with it, but let's get it in and start playing with it. This is still just core code. I'll start converting contrib modules shortly. Dimitri Fontaine and Tom Lane
2011-02-11Allow tab-completion of :variable even as first word on a line.Robert Haas
Christoph Berg
2011-02-10Extend "ALTER EXTENSION ADD object" to permit "DROP object" as well.Tom Lane
Per discussion, this is something we should have sooner rather than later, and it doesn't take much additional code to support it.
2011-02-08Core support for "extensions", which are packages of SQL objects.Tom Lane
This patch adds the server infrastructure to support extensions. There is still one significant loose end, namely how to make it play nice with pg_upgrade, so I am not yet committing the changes that would make all the contrib modules depend on this feature. In passing, fix a disturbingly large amount of breakage in AlterObjectNamespace() and callers. Dimitri Fontaine, reviewed by Anssi Kääriäinen, Itagaki Takahiro, Tom Lane, and numerous others
2011-01-20Add new psql command \dL to list languages.Robert Haas
Original patch by Fernando Ike, revived by Josh Kuperschmidt, reviewed by Andreas Karlsson, and in earlier versions by Tom Lane and Peter Eisentraut.
2011-01-04Improve psql tab completion for CREATE/ALTER ROLE [NO]REPLICATION.Itagaki Takahiro
Missing support for VALID UNTIL in CREATE ROLE is also added.
2011-01-01Basic foreign table support.Robert Haas
Foreign tables are a core component of SQL/MED. This commit does not provide a working SQL/MED infrastructure, because foreign tables cannot yet be queried. Support for foreign table scans will need to be added in a future patch. However, this patch creates the necessary system catalog structure, syntax support, and support for ancillary operations such as COMMENT and SECURITY LABEL. Shigeru Hanada, heavily revised by Robert Haas
2011-01-01Stamp copyrights for year 2011.Bruce Momjian
2010-12-13Improved tab completion for views with triggers.Robert Haas
Allow INSERT INTO, UPDATE, and DELETE FROM to be completed with either the name of a table (as before) or the name of a view with an appropriate INSTEAD OF rule. Along the way, allow CREATE TRIGGER to be completed with INSTEAD OF, as well as BEFORE and AFTER. David Fetter, reviewed by Itagaki Takahiro
2010-11-26Add more ALTER <object> .. SET SCHEMA commands.Robert Haas
This adds support for changing the schema of a conversion, operator, operator class, operator family, text search configuration, text search dictionary, text search parser, or text search template. Dimitri Fontaine, with assorted corrections and other kibitzing.
2010-10-28Add tab completion for psql \dg and \zPeter Eisentraut
Josh Kupershmidt
2010-10-10Teach psql to do tab completion for names of psql variables.Tom Lane
Completion is supported in the context of \set and when interpolating a variable value using :foo etc. In passing, fix some places in tab-complete.c that weren't following project style for comment formatting. Pavel Stehule, reviewed by Itagaki Takahiro
2010-09-27Add a SECURITY LABEL command.Robert Haas
This is intended as infrastructure to support integration with label-based mandatory access control systems such as SE-Linux. Further changes (mostly hooks) will be needed, but this is a big chunk of it. KaiGai Kohei and Robert Haas
2010-09-26Add ALTER TYPE ... ADD/DROP/ALTER/RENAME ATTRIBUTEPeter Eisentraut
Like with tables, this also requires allowing the existence of composite types with zero attributes. reviewed by KaiGai Kohei
2010-09-20Remove cvs keywords from all files.Magnus Hagander
2010-08-14Add a \sf (show function) command to psql, for those times when you need toTom Lane
look at a function but don't wish to fire up an editor. Pavel Stehule, reviewed by Jan Urbanski
2010-07-20Add \conninfo command to psql, to show current connection info.Robert Haas
David Christensen. Reviewed by Steve Singer. Some further changes by me.
2010-07-06pgindent run for 9.0, second runBruce Momjian
2010-06-07Ensure default-only storage parameters for TOAST relationsItagaki Takahiro
to be initialized with proper values. Affected parameters are fillfactor, analyze_threshold, and analyze_scale_factor. Especially uninitialized fillfactor caused inefficient page usage because we built a StdRdOptions struct in which fillfactor is zero if any reloption is set for the toast table. In addition, we disallow toast.autovacuum_analyze_threshold and toast.autovacuum_analyze_scale_factor because we didn't actually support them; they are always ignored. Report by Rumko on pgsql-bugs on 12 May 2010. Analysis by Tom Lane and Alvaro Herrera. Patch by me. Backpatch to 8.4.