Friday, June 27, 2008

Listing psql slash commands

# \?
\a toggle between unaligned and aligned mode
\c[onnect] [dbname|- [user]]
connect to new database (currently 'booktown')
\C <title> table title
\copy ... perform SQL COPY with data stream to the client machine
\copyright show PostgreSQL usage and distribution terms
\d <table> describe table (or view, index, sequence)
\d{t|i|s|v} list tables/indices/sequences/views
\d{p|S|l} list permissions/system tables/lobjects
\da list aggregates
\dd [object] list comment for table, type, function, or operator
\df list functions
\do list operators
\dT list data types
\e [file] edit the current query buffer or [file] with external editor
\echo <text> write text to stdout
\encoding set client encoding
\f <sep> change field separator
\g [file] send query to backend (and results in [file] or |pipe)
\h [cmd] help on syntax of sql commands, * for all commands
\H toggle HTML mode (currently off)
\i <file> read and execute queries from
\l list all databases
\lo_export, \lo_import, \lo_list, \lo_unlink
large object operations
\o [file] send all query results to [file], or |pipe
\p show the content of the current query buffer
\pset <opt> set table output = {format|border|expanded|fieldsep|
null|recordsep|tuples_only|title|tableattr|pager}
\q quit psql
\qecho <text> write text to query output stream (see \o)
\r reset (clear) the query buffer
\s [file] print history or save it in [file]
\set <var> <value> set internal variable
\t show only rows (currently off)
\T <tags> HTML table tags
\unset <var> unset (delete) internal variable
\w <file> write current query buffer to a
\x toggle expanded output (currently off)
\z list table access permissions
\! [cmd] shell escape or command

PS after about a month... not yet satisfied by OpenSUSE 11... or better... not yet satisfied byt KDE4.0 .... still wondering why plasmoids... which is their need... mmm bah...

Thursday, June 5, 2008

<input type="image" />, internet explorer and firefox

AH no way to work around a strange issue with <input type="image" /> and LookupDispatchAction in struts 1.2. Everything works perfectly in development where i'm using Firefox, no way to make it works using IE6 for linux. Bah....

Sunday, June 1, 2008

tcp port conflict starting jboss

eheheh jboss all configuration failed to start cause a tcp port conflict on port 1316. The conflict was with KTorrent running to spread seeds of my downloaded linux distributions.

Metrics

It is important to know the metrics of the code. Metrics are used to know measures of your code and let you understand if it is growing more than a desired measure, this will help to maintain the sources. I've found a good eclipse plugin called... metrics, it is available from its website, and it is given to work with Eclipse 3.1 even if i've found no problems to run it with Eclipse 3.3 (64bit).
Its website provides a brief description of some metric meanings that is worth to be read. As an example, the value of the McCabe Cyclomatic Complexity measure will provide a value to use to know if the already designed unit tests are enough exhaustive or if they lack some test cases.