Freedom, economy and information technology.
Random header image... Refresh for more!

Posts from — July 2007

better unix life2

If you need to work on cluster, is nice to have syncronized terminals to send the same commands in parallel.

Is it also doungerous, so do some test before sending a bunch of vi commands!

On Unix, a cheap and fast solution is Kde “konsole” which has such option.

Look under “View/Send input to all Sessions” menu and try it out.  I was happpy with version 1.6.6 of konsole.
I am not a fan of “xterm variants”, but konsole looks great.

July 31, 2007   Comments Off

Storie vere!

In onore della laurea di una mia cara amica, ripubblico e segnalo una serie di "storie universitarie", che sono sicuro strapperanno più di un sorriso. Buona lettura!

July 7, 2007   Comments Off

oracle mass table drop

Sometimes I need to build a small script to delete a huge set of tables of a schema.

In Oracle is easy to do it, using the meta tables "all_tables", "all_views", and "all_sequences":

select  'drop table ' || table_name || ' cascade constraints;'    from all_tables where owner='protoss' and  table_name not like 'BIN%';

select  'drop view ' || view_name || ' ;'    from all_views where owner='zerg' ;    select  'drop sequence ' || sequence_name || ' ;'    from all_sequences where sequence_owner='spacemarine' ; 

The "BIN%" table are special temp tables of oracle.

On PostgreSQL, try use PG_TABLES meta-table

Happy sqlizing!

July 3, 2007   Comments Off