.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14 .\" .\" Standard preamble: .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .\" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "YASQL 1" .TH YASQL 1 "2005-05-09" "perl v5.8.4" "User Contributed Perl Documentation" .SH "NAME" yasql \- Yet Another SQL*Plus replacement .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fByasql\fR [options] [logon] [@[.ext] [ ] .IP "logon" 4 .IX Item "logon" <\fIusername\fR>[/<\fIpassword\fR>][@<\fIconnect_string\fR>] | / .IP "options" 4 .IX Item "options" .RS 4 .PD 0 .IP "\-d \fIdebuglevel\fR, \-\-debug=\fIdebuglevel\fR" 4 .IX Item "-d debuglevel, --debug=debuglevel" .PD Turn debuggin on to \fIdebuglevel\fR level. Valid levels: 1,2,3,4 .IP "\-H \fIhostaddress\fR, \-\-host=\fIhostaddress\fR" 4 .IX Item "-H hostaddress, --host=hostaddress" Host to connect to .IP "\-p \fIhostport\fR, \-\-port=\fIhostport\fR" 4 .IX Item "-p hostport, --port=hostport" Host port to connect to .IP "\-s \fI\s-1SID\s0\fR, \-\-sid=\fI\s-1SID\s0\fR" 4 .IX Item "-s SID, --sid=SID" Oracle \s-1SID\s0 to connect to .IP "\-h, \-?, \-\-help" 4 .IX Item "-h, -?, --help" Output usage information and quit. .IP "\-A, \-\-nocomp" 4 .IX Item "-A, --nocomp" Turn off the generation of the auto-completion list at startup. Use This if it takes too long to generate the list with a large database. .IP "\-b, \-\-bench, \-\-benchmark" 4 .IX Item "-b, --bench, --benchmark" Turn on extended benchmark info, which includes times and \s-1CPU\s0 usages for both queries and formatting. .IP "\-v, \-\-version" 4 .IX Item "-v, --version" Print version and exit .RE .RS 4 .RE .IP "Examples" 4 .IX Item "Examples" .RS 4 .PD 0 .IP "Connect to local database" 4 .IX Item "Connect to local database" .RS 4 .IP "yasql" 4 .IX Item "yasql" .IP "yasql user" 4 .IX Item "yasql user" .IP "yasql user/password" 4 .IX Item "yasql user/password" .IP "yasql user@LOCAL" 4 .IX Item "yasql user@LOCAL" .IP "yasql user/password@LOCAL" 4 .IX Item "yasql user/password@LOCAL" .IP "yasql \-h localhost" 4 .IX Item "yasql -h localhost" .IP "yasql \-h localhost \-p 1521" 4 .IX Item "yasql -h localhost -p 1521" .IP "yasql \-h localhost \-p 1521 \-s \s-1ORCL\s0" 4 .IX Item "yasql -h localhost -p 1521 -s ORCL" .RE .RS 4 .RE .IP "Connect to remote host" 4 .IX Item "Connect to remote host" .RS 4 .IP "yasql user@REMOTE" 4 .IX Item "yasql user@REMOTE" .IP "yasql user/password@REMOTE" 4 .IX Item "yasql user/password@REMOTE" .IP "yasql \-h remote.domain.com" 4 .IX Item "yasql -h remote.domain.com" .IP "yasql \-h remote.domain.com \-p 1512" 4 .IX Item "yasql -h remote.domain.com -p 1512" .IP "yasql \-h remote.domain.com \-p 1512 \-s \s-1ORCL\s0" 4 .IX Item "yasql -h remote.domain.com -p 1512 -s ORCL" .RE .RS 4 .RE .RE .RS 4 .RE .PD .PP If no connect_string or a hostaddress is given, then will attempt to connect to the local default database. .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\s-1YASQL\s0 is an open source Oracle command line interface. \s-1YASQL\s0 features a much kinder alternative to SQL*Plus's user interface. This is meant to be a complete replacement for SQL*Plus when dealing with ad hoc queries and general database interfacing. It's main features are: .IP "Full ReadLine support" 4 .IX Item "Full ReadLine support" Allows the same command line style editing as other ReadLine enabled programs such as \s-1BASH\s0 and the Perl Debugger. You can edit the command line as well as browse your command history. The command history is saved in your home directory in a file called .yasql_history. You can also use tab completion on all table and column names. .IP "Alternate output methods" 4 .IX Item "Alternate output methods" A different style of output suited to each type of need. There are currently table, list and \s-1CSV\s0 output styles. Table style outputs in the same manner as SQL*Plus, except the column widths are set based on the width of the data in the column, and not the column length defined in the table schema. List outputs each row on it's own line, column after column for easier viewing of wide return results. \s-1CSV\s0 outputs the data in Comma Seperated Values format, for easy import into many other database/spreadsheet programs. .IP "Output of query results" 4 .IX Item "Output of query results" You can easily redirect the output of any query to an external file .IP "Data Input and Binding" 4 .IX Item "Data Input and Binding" \&\s-1YASQL\s0 allows you to bind data in an external \s-1CSV\s0 file to any query, using standard \s-1DBI\s0 placeholders. This is the ultimate flexibility when inserting or updating data in the database. .IP "Command pipes" 4 .IX Item "Command pipes" You can easily pipe the output of any query to an external program. .IP "Tab completion" 4 .IX Item "Tab completion" All tables, columns, and other misc objects can be completed using tab, much like you can with bash. .IP "Easy top rownum listings" 4 .IX Item "Easy top rownum listings" You can easily put a number after a terminator, which will only output those number of lines. No more typing \*(L"where rownum < 10\*(R" after every query. Now you can type 'select * from table;10' instead. .IP "Enhanced Data Dictionary commands" 4 .IX Item "Enhanced Data Dictionary commands" Special commands like 'show tables', 'desc ', 'show indexes on
', \&'desc ', and many many more so that you can easily see your schema. .IP "Query editing" 4 .IX Item "Query editing" You can open and edit queries in your favorite text editor. .IP "Query chaining" 4 .IX Item "Query chaining" You can put an abitrary number of queries on the same line, and each will be executed in turn. .IP "Basic scripting" 4 .IX Item "Basic scripting" You can put basic \s-1SQL\s0 queries in a script and execute them from \s-1YASQL\s0. .IP "Config file" 4 .IX Item "Config file" You can create a config file of options so that you don't have to set them everytime you run it. .IP "Future extensibility" 4 .IX Item "Future extensibility" We, the community, can modify and add to this whatever we want, we can't do that with SQL*Plus. .SH "REQUIREMENTS" .IX Header "REQUIREMENTS" .IP "Perl 5" 4 .IX Item "Perl 5" This was developed with Perl 5.6, but is known to work on 5.005_03 and above. Any earlier version of Perl 5 may or may not work. Perl 4 will definately not work. .IP "Unix environment" 4 .IX Item "Unix environment" \&\s-1YASQL\s0 was developed under GNU/Linux, and aimed at as many Unix installations as possible. Known to be compatible with GNU/Linux, \s-1AIX\s0 and Sun Solaris. Please send me an email (qzy@users.sourceforge.net) if it works for other platforms. I'd be especially interested if it worked on Win32. .IP "Oracle Server" 4 .IX Item "Oracle Server" It has been tested and developed for Oracle8 and Oracle8i. There is atleast one issue with Oracle7 that I know of (see \s-1ISSUES\s0 below) and I have not tested it with Oracle9i yet. .IP "Oracle client libraries" 4 .IX Item "Oracle client libraries" The Oracle client libraries must be installed for DBD::Oracle. Of course you can't install DBD::Oracle without them... .IP "DBD::Oracle" 4 .IX Item "DBD::Oracle" DBD::Oracle must be installed since this uses \s-1DBI\s0 for database connections. .IP "\s-1ORACLE_HOME\s0" 4 .IX Item "ORACLE_HOME" The \s-1ORACLE_HOME\s0 environment variable must be set if you use a connection descriptor to connect so that \s-1YASQL\s0 can translate the descriptor into usefull connection information to make the actual connection. .IP "\s-1ORACLE_SID\s0" 4 .IX Item "ORACLE_SID" The \s-1ORACLE_SID\s0 environment variable must be set unless you specify one with the \&\-s option (see options above). .IP "Term::Readline" 4 .IX Item "Term::Readline" Term::Readline must be installed (it is with most Perl installations), but more importantly, installing Term::ReadLine::Gnu from \s-1CPAN\s0 will greatly enhance the usability. .IP "Time::HiRes" 4 .IX Item "Time::HiRes" This is used for high resolution benchmarking. It is optional. .IP "Text::CSV_XS" 4 .IX Item "Text::CSV_XS" This perl module is required if you want to output \s-1CSV\s0 or input from \s-1CSV\s0 files. If you don't plan on using this features, then you don't need to install this module. .IP "Term::ReadKey" 4 .IX Item "Term::ReadKey" This module is used for better input and output control. Right now it isn't required, but some parts of \s-1YASQL\s0 will look and function better with this installed. .SH "CONFIG" .IX Header "CONFIG" \&\s-1YASQL\s0 will look for a config file first in ~/.yasqlrc then /etc/yasql.conf. The following options are available: .IP "connection_timeout = " 4 .IX Item "connection_timeout = " Timeout for connection attempts .Sp Default: 20 .IP "max_connection_attempts = " 4 .IX Item "max_connection_attempts = " The amount of times to attempt the connection if the username/password are wrong .Sp Default: 3 .IP "history_file = " 4 .IX Item "history_file = " Where to save the history file. Shell metachars will be globbed (expanded) .Sp Default: ~/.yasql_history .IP "pager = " 4 .IX Item "pager = " Your favorite pager for extended output. (right now only the help command) .Sp Default: /bin/more .IP "auto_commit = [0/1]" 4 .IX Item "auto_commit = [0/1]" Autocommit any updates/inserts etc .Sp Default: 0 .IP "commit_on_exit = [0/1]" 4 .IX Item "commit_on_exit = [0/1]" Commit any pending transactions on exit. Errors or crashes will still cause the current transaction to rollback. But with this on a commit will occur when you explicitly exit. .Sp Default: 0 .IP "long_trunc_ok = [0/1]" 4 .IX Item "long_trunc_ok = [0/1]" Long truncation \s-1OK\s0. If set to 1 then when a row contains a field that is set to a \s-1LONG\s0 time, such as \s-1BLOB\s0, \s-1CLOB\s0, etc will be truncated to long_read_len length. If 0, then the row will be skipped and not outputted. .Sp Default: 1 .IP "long_read_len = " 4 .IX Item "long_read_len = " Long Read Length. This is the length of characters to truncate to if long_trunc_ok is on .Sp Default: 80 .IP "edit_history = [0/1]" 4 .IX Item "edit_history = [0/1]" Whether or not to put the query edited from the 'edit' command into the command history. .Sp Default: 1 .IP "auto_complete = [0/1]" 4 .IX Item "auto_complete = [0/1]" Whether or not to generate the autocompletion list on connection. If connecting to a large database (in number of tables/columns sense), the generation process could take a bit. For most databases it shouldn't take long at all though. .Sp Default: 1 .IP "extended_complete_list = [0/1]" 4 .IX Item "extended_complete_list = [0/1]" extended complete list will cause the possible matches list to be filled by basicly any and all objects. With it off the tab list will be restricted to only tables, columns, and objects owned by the current user. .Sp Default: 0 .IP "complete_tables = [0/1]" 4 .IX Item "complete_tables = [0/1]" This controls whether or not to add tables to the completion list. This does nothing if auto_complete is set to 0. .Sp Default: 1 .IP "complete_columns = [0/1]" 4 .IX Item "complete_columns = [0/1]" This controls whether or not to add columns to the completion list. This does nothing if auto_complete is set to 0. .Sp Default: 1 .IP "complete_objects = [0/1]" 4 .IX Item "complete_objects = [0/1]" This controls whether or not to add all other objects to the completion list. This does nothing if auto_complete is set to 0. (Hint... depending on your schema this will include tables and columns also, so you could turn the other two off) .Sp Default: 1 .IP "extended_benchmarks = [0/1]" 4 .IX Item "extended_benchmarks = [0/1]" Whether or not to include extended benchmarking info after queries. Will include both execution times and \s-1CPU\s0 loads for both the query and formatting parts of the process. .Sp Default: 0 .IP "prompt" 4 .IX Item "prompt" A string to include in the prompt. The prompt will always be suffixed by a \&'>' string. Interpolated variables: \f(CW%H\fR = connected host. will be prefixed with a '@' \f(CW%U\fR = current user .Sp Default: \f(CW%U\fR%H .IP "column_wildcards = [0/1]" 4 .IX Item "column_wildcards = [0/1]" Column wildcards is an extremely experimental feature that is still being hashed out due to the complex nature of it. This should affect only select statements and expands any wildcards (*) in the column list. such as \&'select col* from table;'. .Sp Default: 0 .IP "sql_query_in_error = [0/1]" 4 .IX Item "sql_query_in_error = [0/1]" This this on to output the query in the error message. .Sp Default: 0 .IP "nls_date_format = " 4 .IX Item "nls_date_format = " Set the preferred \s-1NLS_DATE_FORMAT\s0. This effects both date input and output formats. The default is \s-1ISO\s0 standard (\s-1YYYY\-MM\-DD\s0 \s-1HH24:MI:SS\s0', not oracle default (\s-1YYYY\-MM\-DD\s0). .Sp Default: YYYY-MM-DD \s-1HH24:MI:SS\s0 .IP "fast_describe" 4 .IX Item "fast_describe" Turn on fast describes. These are much faster than the old style of desc
, however non-built in datatypes may not be returned properly. i.e. a \&\s-1FLOAT\s0 will be returned as a \s-1NUMBER\s0 type. Internally FLOATs really are just NUMBERs, but this might present problems for you. If so, set this to 0 .Sp Default: 1 .SH "ISSUES" .IX Header "ISSUES" .IP "Oracle7" 4 .IX Item "Oracle7" DBD::Oracle for Oracle8 may have issues connecting to an Oracle7 database. The one problem I have seen is that the use of placeholders in a query will cause oracle to issue an error \*(L"\s-1ORA\-01008:\s0 not all variables bound\*(R". This will affect all of the hard-coded queries that I use such as the ones for the 'desc' and \&'show' commands. The queries that you type in on the command line may still work. The DBD::Oracle \s-1README\s0 mentions the use of the '\-8' option to the \&'perl Makefile.PL' command to use the older Oracle7 \s-1OCI\s0. This has not been tested. .SH "AUTHOR" .IX Header "AUTHOR" Originaly written by Nathan Shafer (\fBnshafer@ephibian.com\fR) with support from Ephibian, Inc. http://www.ephibian.com Now it is mostly developed and maintained by Balint Kozman (\fBqzy@users.sourceforge.net\fR). http://www.imind.hu .SH "THANKS" .IX Header "THANKS" Thanks to everyone at Ephibian that helped with testing, and a special thanks to Tom Renfro at Ephibian who did a lot of testing and found quite a few doozies. Also a lot of thanks goes to the mates at iMind.dev who keep suffering from testing new features on them. .PP The following people have also contributed to help make \s-1YASQL\s0 what it is: Allan Peda, Lance Klein, Scott Kister, Mark Dalphin, Matthew Walsh .PP And always a big thanks to all those who report bugs and problems, especially on other platforms. .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (C) 2000\-2002 Ephibian, Inc., 2005 iMind.dev. .SH "LICENSE" .IX Header "LICENSE" This program is free software; you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. .PP This program is distributed in the hope that it will be useful, but \s-1WITHOUT\s0 \s-1ANY\s0 \s-1WARRANTY\s0; without even the implied warranty of \&\s-1MERCHANTABILITY\s0 or \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0. See the \&\s-1GNU\s0 General Public License for more details. .PP You should have received a copy of the \s-1GNU\s0 General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place \- Suite 330, Boston, \s-1MA\s0 02111\-1307, \s-1USA\s0. .SH "TODO" .IX Header "TODO" .IP "desc a synomym doesn't keep the right schema... I think. Saw in desc parking.customer when logged in as cccrsmgr in 3c db" 4 .IX Item "desc a synomym doesn't keep the right schema... I think. Saw in desc parking.customer when logged in as cccrsmgr in 3c db" .PD 0 .IP "allow history to be saved based on host (as an option)" 4 .IX Item "allow history to be saved based on host (as an option)" .IP "make stifle_history a configurable option" 4 .IX Item "make stifle_history a configurable option" .ie n .IP "a row is printed after ""Attempting to cancel query""" 4 .el .IP "a row is printed after ``Attempting to cancel query''" 4 .IX Item "a row is printed after Attempting to cancel query" .IP "reading from a script will not change prompt properly (for a script with no terminator)" 4 .IX Item "reading from a script will not change prompt properly (for a script with no terminator)" .IP "\s-1NULL\s0 stops printing after table goes into overflow or something" 4 .IX Item "NULL stops printing after table goes into overflow or something" .IP "extra space in \eG... maybe others" 4 .IX Item "extra space in G... maybe others" .IP "bug: tag completion doesn't work with caps anymore" 4 .IX Item "bug: tag completion doesn't work with caps anymore" .IP "Add support for /NOLOG" 4 .IX Item "Add support for /NOLOG" .IP "allow dblinks in show blah on blah commands" 4 .IX Item "allow dblinks in show blah on blah commands" .IP "show query doesn't work with schemas and db links" 4 .IX Item "show query doesn't work with schemas and db links" .IP "add save and get buffer commands" 4 .IX Item "add save and get buffer commands" .IP "add R[\s-1UN\s0] command (/ equivilent)" 4 .IX Item "add R[UN] command (/ equivilent)" .IP "add support for just 'connect' and prompt for username and password" 4 .IX Item "add support for just 'connect' and prompt for username and password" .IP "add PASSW[\s-1ORD\s0] command for changing password" 4 .IX Item "add PASSW[ORD] command for changing password" .IP "add \-s[ilent] command line to suppress all startup output and command prompts" 4 .IX Item "add -s[ilent] command line to suppress all startup output and command prompts" .IP "add 'start' command for scripting" 4 .IX Item "add 'start' command for scripting" .IP "add 'run' synonum for '/'" 4 .IX Item "add 'run' synonum for '/'" .IP "add 'show parameters ' support" 4 .IX Item "add 'show parameters ' support" .IP "fix segfaults when cancelling large outputs" 4 .IX Item "fix segfaults when cancelling large outputs" .IP "Add a '\s-1SPOOL\s0' command" 4 .IX Item "Add a 'SPOOL' command" .IP "fix 'set...' commands" 4 .IX Item "fix 'set...' commands" .IP "Add variable bindings, prompting, control structures, etc." 4 .IX Item "Add variable bindings, prompting, control structures, etc." .IP "be able to describe any kind of object" 4 .IX Item "be able to describe any kind of object" .IP "Add 'startup queries' in config file or support glogin.sql and login.sql" 4 .IX Item "Add 'startup queries' in config file or support glogin.sql and login.sql" .IP "fix case sensitive object names" 4 .IX Item "fix case sensitive object names" .IP "make win32 compliant" 4 .IX Item "make win32 compliant" .IP "add better error messages when the user can't access a data dictionary table" 4 .IX Item "add better error messages when the user can't access a data dictionary table" .IP "add better error output, with line/col numbers and maybe a pointer." 4 .IX Item "add better error output, with line/col numbers and maybe a pointer." .IP "add chained ops, exactly like bash" 4 .IX Item "add chained ops, exactly like bash" .IP "add plugins and hooks for all aspects." 4 .IX Item "add plugins and hooks for all aspects." .IP "Add smarter tables and wrapping in columns. Also add configurable max column widths and max table width." 4 .IX Item "Add smarter tables and wrapping in columns. Also add configurable max column widths and max table width." .IP "Add a curses interface option for easy viewing and scrolling, etc. This will require some research to determine if it's even worth it." 4 .IX Item "Add a curses interface option for easy viewing and scrolling, etc. This will require some research to determine if it's even worth it." .IP "Add \s-1HTML\s0 output option" 4 .IX Item "Add HTML output option" .PD .SH "CHANGELOG" .IX Header "CHANGELOG" $Log: yasql,v $ Revision 1.83 2005/05/09 16:57:13 qzy Fixed the '\s-1DECIMAL\s0' problem with describe command. Added sql mode with \ei (patch by Ed Avis). Added redirectors (>, >>, |) to describe. Added 'show user' command. Added 'show uid' command. Added new makefile targets: clean, check. (patch by Ed Avis) Added \*(L"and owner = ?\*(R" to some show targets (patch by anonymous). Added command_complete_list feature and config option. Added disconnect command Added command completion: select, update, insert, delete, execute, etc. Added table.column name completion. Added feature to run tty-less (patch by Michael Kroell). Added a workaround for SunOS's \fIalarm()\fR bug (patch by Ed Avis). Fixed some minor issues in parser code. .PP Revision 1.82 2005/02/18 16:57:13 qzy Added batch mode (ewl patch). Allow connections \s-1AS\s0 \s-1SYSDBA\s0, \s-1AS\s0 \s-1SYSOPER\s0 and internal (sysdba patch by Derek Whayman). Added server_output to config options. Changed script execution to only add script lines to the query buffer (and not to history). .PP Revision 1.81 2002/03/06 21:55:13 nshafer Fixed bug with password prompt. Added 'show plan' for outputting last explain plan results. Added 'show query' for viewing queries for views and materialized views. Optimized describes to be as fast as describes in SQL*Plus. Added new option 'fast_describe' on by default for new describe method. Added single_output as a formatting option for internal use. Fixed problem with password, quit, exit, \eq getting added to the history list. Changed history to not add duplicate entries right next to each other. Added support for basic (non\-returning) \s-1PL/SQL\s0 commands. Added support for create function, package, package body, prodedure, trigger. Added 'show errors' command Added 'conn' shortcut for 'connection'. Added 'exec[ute]' command. Added 'set serverout[put] on|off' command to mimic SQL*Plus's. Added alarms to pings in cases where \s-1DB\s0 connection is dropped and ping hangs. Cleaned up error messages. Renamed config options AutoCommit, CommitOnExit, LongTruncOk, and LongReadLen toauto_commit, commit_on_exit, long_trunc_ok, and long_read_len. Old names are now deprecated. Changed quote escaping to be '' and "\*(L" instead of \e' and \e\*(R". Added full support for comments: rem[ark], \-\-, and /* */. Right-justify works for the '8' datatype as well as '3' now. Re-worked debug output levels. Optimized query for completion lists a bit. Added completion-list limiting based on location in some \s-1DML\s0 statements (select, update, insert). Fixed up the display of '...' when generating tab completion list. Should work a lot better when hitting tab in the middle of the line. Added show views, objects, sequences, clusters, dimensions, functions, procedures, packages, indexes, indextypes, libraries, materialized views, snapshots, synonyms, triggers. Added show all command. Added type and owner columns to show commands. Fixed commit_on_exit logic. Added ability to use external authentication ('yasql /'). The .sql extension for the scripting and editing commands are now optional. Fixed up editor execution to hopefully find the editor better. Added \*(L"Command\*(R" entry to \*(L"show processes\*(R". Added \*(L"show waits\*(R" and \*(L"show all waits\*(R" commands. Re-organized command line usage in anticipation for script parameters. Removed all uses of 'stty'. Added processing of \s-1STDIN\s0, so redirects and pipes to \s-1YASQL\s0 work now. Changed benchmarking to include time for fetching... this should work better with Oracle 7.x, which doesn't seem to execute the query until you try fetching Updated documentation. Fixed up \fIalarm()\fR calls. Fixed setting of \s-1NLS_DATE_FORMAT\s0 to apply on reconnects. Broke commands into 2 sets... ones that exectute any time, and ones that execute only when nothing is in the buffer Fixed printing of text read in from an edit command. It now echoes all of it. Now ignoring most \s-1SET\s0 commands so we don't tack them onto queries Fixed permissions in tarball .PP Revision 1.80 2001/08/01 18:06:27 nshafer Fixed bug with delayed \f(CW$term\fR initialization .PP Revision 1.79 2001/08/01 17:52:35 nshafer Fixed compatibility issues with the data dictionary in Oracle 7. Fixed ordering of indexes for compound indexes. Fixed display of objects from other schemas in some data dictionary commands such as 'show indexes on table'. (Thanks Nix) Fixed matching of declare and end in query string. Will not only match if on blank line. Fixed matching of '/' terminator in middle of queries. Will now only match if at end of line (Thanks Wesley Hertlein). Temp file for editing now appends '.sql' to end of temp file so that editors, like vim, automatically turn on syntax highlighting. Added searching of environment variable \s-1SQLPATH\s0 when looking for scripts. Terminal setup is now after script parsing, so that it will work when run under cron (Thanks David Zverina). .PP Revision 1.78 2001/07/05 13:52:56 nshafer Fixed bug where parens were matching improperly. .PP Revision 1.77 2001/07/04 02:57:08 nshafer Fixed bug where terminators wouldn't match if they were the next character after a quote character. .PP Revision 1.76 2001/06/28 04:17:53 nshafer Term::ReadLine::Perl now supported, for what little functionality it does provide. Fixed segfault when hitting up when history is empty. Fixed bug when providing script names on command line (Thanks to Dave Zverina.) Rewrote the query parser to fix a bug, caused by the multiple\-queries\-on\-one\- line feature, that causes terminators, such as ';' and '/' to match when in quotes. When hitting tab on a line starting with a '@' for scripts, tab will now complete filenames and not database objects. Fixed \s-1DB\s0 timeout when prompting for username and password. Added support for '\s-1DECLARE\s0' keyword, however this does not mean that variable binding in \s-1PL/SQL\s0 blocks works yet. Sped up startup time a bit more (hopefully). .PP Revision 1.75 2001/06/19 16:02:16 nshafer Fixed typo in error message for Term::ReadLine::Gnu Fixed crash when tab hit at username or password prompt Added \*(-- as a comment type and fixed case where comment in quotes would match. (Mark Dalphin) Fixed 'desc' to also describe partitioned tables (Erik) .PP Revision 1.74 2001/06/18 21:07:55 nshafer Fixed bug where / would not rerun last query (thanks Scott Kister) .PP Revision 1.73 2001/05/23 18:35:17 nshafer Got rid of \*(L"Prototype mismatch\*(R" errors. Fixed typo in extended benchmarks .PP Revision 1.72 2001/05/22 16:06:36 nshafer Fixed bug with error messages not displaying first time, and fixed bug with tab completion output .PP Revision 1.71 2001/05/17 21:28:40 nshafer New \s-1CSV\s0 output format. Added \s-1CSV\s0 file input on any query. Added ability to pipe query results to any program. Added ability for multiple queries on one line. Changed tab completion generator to run first time you hit tab instead of on startup, which speeds up database connection. Now using SelfLoader to speed up loading and minimize memory use. Added a 'show plan for _\|__\|_' command for easy display of explain plan output. Query times are now more readable and will split into weeks, days, hours, minutes, and seconds. Hopefully fixed some problems with stty and Solaris 2.4. Added support for 'rem' comments in scripts. Redirection output files are now shell expanded. .PP Revision 1.70 2001/05/08 17:49:51 nshafer Fixed all places where a non-alphanumeric object name would break or not match. Added code for autoconf style installs. .PP Revision 1.69 2001/05/07 23:47:47 nshafer fixed type .PP Revision 1.68 2001/05/07 22:26:20 nshafer Fixed tab completion problems when completing objects with a $ in their name. Added config options complete_tables, complete_columns, and complete_objects, Added redirection of query output to file. Hopefully sped up exiting. Updated documentation. .PP Revision 1.67 2001/05/04 17:35:04 nshafer \&\s-1YASQL\s0 will now suspend properly back to the shell when \s-1SIGTSTP\s0 is sent, as in when you hit ctrl-z on most systems. Added \s-1NLS_DATE_FORMAT\s0 setting in config file to support alter date views. Defaults to \s-1ISO\s0 standard. \s-1YASQL\s0 will now attempt to change it's process name, such as when viewed in ps or top. This will not work on all systems, nor is it a complete bullet proof way to hide your password if you provide it on the command line. But it helps to not make it so obvious to regular users. Scripts entered on the command line are now checked to be readable before attempting connection. A failed 'connect command will no long alter the prompt. Added \ep option for printing the current buffer, ala psql. Large query results (over 1000 rows) are now handled \s-1MUCH\s0 better. \s-1YASQL\s0 will no longer try to hold more than 1000 rows in memory, which keeps it from sucking memory, and also improves the speed. When a query does return more than 1000 rows in table mode, those first 1000 will determine the column widths, and all rows after that will get truncated. \&\s-1AIX\s0 has been reported to run \s-1YASQL\s0 perfectly. .PP Revision 1.66 2001/03/13 21:34:58 nshafer There are no longer any references to termcap, so yasql should now work on termcap-less systems such as Debian Linux and \s-1AIX\s0 .PP Revision 1.65 2001/03/12 17:44:31 nshafer Restoring the terminal is hopefully more robust and better now. \s-1YASQL\s0 now tries to use the 'stty' program to dump the settings of the terminal on startup so that it can restore it back to those settings. It requires that stty is installed in the path, but that should be the case with most systems. Also made the output of the query in the error message an option that is off by default. I had never meant to include that in the final release, but kept on forgetting to take it out. .PP Revision 1.64 2001/03/06 16:00:33 nshafer Fixed bug where desc would match anytime, even in middle of query, which is bad. .PP Revision 1.63 2001/03/01 17:30:26 nshafer Refined the ctrl-c process for not-so-linuxy \s-1OS\s0's, namely solaris. Now stripping out Dos carriage returns since SQL*Plus seems to. .PP Revision 1.62 2001/02/26 22:39:12 nshafer Fixed bug where prompt would reset itself when a blank line was entered. Added script argument on command line (Lance Klein) Added support for any command line commands in the script (Lance Klein) The 'desc' and 'show' commands no longer require a terminator (like ;) as long as the whole statement is on one line (Lance Klein) Added option 'extended_tab_list' for a much bigger, more complete tab listing (Lance Klein) The edit command is no longer limited to 1 query at a time. You can now put any valid command or query, and as many of them as you want. The parsing rules for the edit command is exactly identical to the script parsing. cleaned up documentation a bit .PP Revision 1.61 2001/01/31 19:56:22 nshafer changed CommitOnExit to be 1 by default, to emulate SQL*Plus behavior, and at popular request .PP Revision 1.60 2001/01/29 16:38:17 nshafer got rid of (tm) .PP Revision 1.59 2001/01/29 16:28:22 nshafer Modified docs a little with the new scope of open source now in the mix. .PP Revision 1.58 2001/01/24 15:27:00 nshafer cleanup_after_signals is not in the Term::ReadLine::Stub, so it would output error messages on systems without Term::ReadLine::Gnu. Fixed .PP Revision 1.57 2001/01/17 23:26:53 nshafer Added Tom Renfro's column_wildcard expansion code. New conf variable: column_wildcards. 0 by default until this code is expanded on a bit more. .PP Revision 1.56 2001/01/17 23:00:25 nshafer Added CommitOnExit config, 0 by default. Added info output at startup and when a new connection is initiated about the state of AutoCommit and CommitOnExit. Also added statement about explicit rollback or commit when disconnecting. Added warning message to commit_cmd and rollback_cmd if AutoCommit is on. Now explicitly committing or rolling back on disconnect, it is no longer left up to the \s-1DBI\s0's discretion... except in abnormal termination. .PP Revision 1.55 2001/01/11 18:05:12 nshafer Added trap for regex errors in tab completion (like if you put 'blah[' then hit tab) .PP Revision 1.54 2001/01/10 17:07:22 nshafer added output to those last 2 commands .PP Revision 1.53 2001/01/10 17:03:58 nshafer added commit and rollback commands so that you don't have to send them to the backend .PP Revision 1.52 2001/01/10 16:00:08 nshafer fixed bug with prompt where on each call get_prompt would add another '@'. Thanks Tom .PP Revision 1.51 2001/01/09 21:16:12 nshafer dar... fixed another bug where the \f(CW%H\fR would stay if there was no prompt_host .PP Revision 1.50 2001/01/09 21:12:13 nshafer fixed bug with that last update. Now it only interpolates the \f(CW%H\fR variable if there is something to interpolate it with .PP Revision 1.49 2001/01/09 21:09:56 nshafer changed the \f(CW%H\fR variable to be prefixed with a @ .PP Revision 1.48 2001/01/09 21:04:36 nshafer changed 'default' to '' for the prompt's hostname when no connect_string is used .PP Revision 1.47 2001/01/09 20:55:11 nshafer added configurable prompt and changed the default prompt .PP Revision 1.46 2001/01/09 18:50:50 nshafer updated todo list .PP Revision 1.45 2001/01/09 18:32:35 nshafer Added 'connect ' command. I may add the ability to specify options like on the command line (like '\-H blah.com') .PP Revision 1.44 2001/01/08 22:08:49 nshafer more documentation changes .PP Revision 1.43 2001/01/08 20:51:31 nshafer added some documentation .PP Revision 1.42 2001/01/08 20:09:35 nshafer Added debug and autocommit commands .PP Revision 1.41 2001/01/08 18:12:43 nshafer added \s-1END\s0 handler to hopefully clean up the terminal better .PP Revision 1.40 2001/01/05 23:29:38 nshafer new name! .PP Revision 1.39 2001/01/05 18:00:16 nshafer Added config file options for auto completion generation and extended benchmark info .PP Revision 1.38 2001/01/05 16:39:47 nshafer Fixed error where calling edit a second time would not open the file properly because of the way \fIglob()\fR works. .PP Revision 1.37 2001/01/04 23:52:30 nshafer changed the version string to parse it out of the revision string (duh...) moved the prompting of username and password so that the check for the oracle_home variable happens before. Before if you didn't have the environment variable set then it will prompt you for username and password, then die with the error, which is annoying fixed the quit calls so taht they properly erase the quit line from the history. I had broken this a long time ago when I added the exit status param to the quit function Outputting in full table format (';' terminator) with a num_rows number (like ';100') would still cause the entire result set to be pulled into memory, which was really slow and could take a lot of memory if the table was large. Fixed it so that it only pulls in num_rows number of rows when using the digit option .PP Revision 1.36 2000/12/22 22:12:18 nshafer fixed a wrong-quote-type in the debug messages .PP Revision 1.35 2000/12/22 22:07:06 nshafer forgot version... you know the drill... .PP Revision 1.34 2000/12/22 21:57:01 nshafer Added config file support, queries from the 'edit' command are now entered into the command history (configurable), cleaned up the \s-1SIGINT\s0 actions quite a bit so they should work better now, added LongReadLen and LongTruncOk options so that \s-1LONG\s0 columns types won't mess up, added the number after terminator feature to limit how many rows are returned. .PP Revision 1.33 2000/12/20 22:56:03 nshafer version number.... again.... sigh .PP Revision 1.32 2000/12/20 22:55:32 nshafer added todo item, now in rpms .PP Revision 1.31 2000/12/20 17:07:52 nshafer added the reprompt for username/password on error 1005 null password given .PP Revision 1.30 2000/12/20 17:04:18 nshafer Refined the shadow_redisplay stuff. Now I will only use my builtin function if the terminal type is set to \*(L"xterm\*(R" because that terminal type has a broken termcap entry. Also set it to not echo when entering password if Term::ReadLine::Gnu is not installed .PP Revision 1.29 2000/12/20 15:47:56 nshafer trying a new scheme for the shadow_redisplay. Clear to \s-1EOL\s0 wasn't working Also fixed a few problems in the documentation \&., .PP Revision 1.28 2000/12/19 23:55:03 nshafer I need to stop forgetting the revision number... .PP Revision 1.27 2000/12/19 23:48:49 nshafer cleaned up debugging .PP Revision 1.26 2000/12/19 23:10:18 nshafer Lotsa new stuff... tab completion of table, column, and object names, improved signal handling, the edit command now accepts a filename parameter, new command 'show processes' which shows you info on who's connected, improved benchmark info, and a lot of other cleanup/tweaks .PP Revision 1.25 2000/12/13 16:58:26 nshafer oops forgot documentation again .PP Revision 1.24 2000/12/13 16:54:42 nshafer added desc .PP Revision 1.23 2000/12/12 17:52:15 nshafer updated todo list (oops, forgot) .PP Revision 1.22 2000/12/12 17:51:39 nshafer added desc .PP Revision 1.21 2000/12/12 17:15:28 nshafer fixed bug when connecting using a host string (\-H option) added a few more types to the 'show' and 'desc' commands .PP Revision 1.20 2000/12/08 22:13:43 nshafer many little fixes and tweaks here and there .PP Revision 1.19 2000/12/06 20:50:03 nshafer added scripting ability with \*(L"@\*(R" command changed all tabs to spaces! .PP Revision 1.18 2000/12/06 19:30:38 nshafer added clear command refined connection process. if invalid username/password entered then prompt again .PP Revision 1.17 2000/12/05 22:20:58 nshafer Tightened up outputs. Doesn't show column names if no rows selected, if it's not a select, then show number of rows affected .PP Revision 1.16 2000/12/04 18:04:53 nshafer *** empty log message *** .PP Revision 1.15 2000/12/04 18:03:14 nshafer fixed bug where the \-H option was interpreted as \-h or help. All command line options are now case sensitive .PP Revision 1.14 2000/12/04 17:54:38 nshafer Added list command (and \el and l) .PP Revision 1.13 2000/12/04 17:34:18 nshafer fixed a formatting issue if Time::HiRes isn't installed .PP Revision 1.12 2000/12/04 17:29:41 nshafer Added benchmark options to view the extended benchmark info. Now it displays just the time in a more friendly format. The old style is only active if the benchmark option is specified. Cleaned up some formatting issues Brought the usage and \s-1POD\s0 documentation up to date Added some items to the \s-1TODO\s0 .PP Revision 1.11 2000/11/30 22:54:38 nshafer Fixed bug with the edit command where if you were 'inquotes' then you would stay in quotes even after editing the file .PP Revision 1.10 2000/11/30 22:01:38 nshafer Fixed bug where username and password were added to the command history. Set it so that the quit commands are not added to the command history either. Added the 'edit' command and modified it's todo list item, as well as added it to the 'help' command .PP Revision 1.9 2000/11/29 17:55:35 nshafer changed version from .21 to 1.0 beta 9. I'll follow the revision numbers now .PP Revision 1.8 2000/11/29 17:46:31 nshafer added a few items to the todo list .PP Revision 1.7 2000/11/29 15:50:56 nshafer got rid of \s-1SID\s0 output at startup .PP Revision 1.6 2000/11/29 15:49:51 nshafer moved revision info to \f(CW$revision\fR and added Id output .PP Revision 1.5 2000/11/29 15:46:41 nshafer fixed revision number .PP Revision 1.4 2000/11/29 15:44:23 nshafer fixed issue where environment variable \s-1ORACLE_SID\s0 overwrote explicit set on the command line. now whatever you put on the command line will overwrite the environment variable