Skip to content

Un café con leche con hielo por favor…

08-Aug-08

In a belated follow-up/me too post to notnull’s Donnez-moi un café Ingres. I too would like to congratulate Samrat Dhillon and Andrew Ross on their recent win at LinuxWorld for Best Application Development Tool. ¡¡¡¡Way to go guys!!!!

Ingres Documentation Search

08-Aug-08

For quite some time the Ingres Documentation has been available on line via http://docs.ingres.com. This is nothing new. What else is not new is that you could search the documentation using a search engine plug-in/provider. http://docs.ingres.com has a link allowing Firefox and Internet Explorer 7+ users to perform a direct search against the docs rather than using Google/Live Search/Yahoo.
//docs.ingres.com

What is new is that this search capability has been added/published in the Mycroft project database. So if you are looking to add a search plug-in to your browser and want to search for Ingres you will now get Ingres Documentation as a valid search.:

search for Ingres via mycroft

If you wish to install the Mycoft search and already have the existing search plug-in from http://docs.ingres.com you will have to delete the already installed search due to a name conflict with the identifier used. That said there is no reason reason to install the newer search as it calls through to the same search page. The only thing you will get is the newer favicon.ico used on http://ingres.com.

links for 2008-08-05 [delicious.com]

05-Aug-08

links for 2008-07-31

31-Jul-08

links for 2008-07-30

30-Jul-08

Pretty but useless

08-Jul-08

Some of the things I stumble across are quite impressive/pretty but to me have no real use. This is an example of such a beast… :
this blog feed through wordle
Goto http://wordle.net/create to generate your own wordle or take a look at http://wordle.net/gallery?username=grantc for some other wordles i have generated.

Ingres Ruby Driver and Ruby on Rails Adapter version 1.3.0

08-Jul-08

Last week I released version 1.3.0 of the Ruby and RoR adapter for Ingres. This release includes the following changes:

Ingres Ruby Driver:

  • Restrict tables() to only return non-system tables
  • Add support for Ingres datatypes float4, float8, money, decimal, bigint, and ANSI SQL date/time/timestamp

Ruby on Rails adapter:

This new release can be obtained from http://www.ingres.com/downloads/connectivity-resources.php or via one of the following links:

Alternatively you can checkout this release from our external source code repository:

svn checkout http://code.ingres.com/ingres/drivers/ruby/tags/ingres-ruby-1.3.0

See http://community.ingres.com/wiki/Connectivity_Drivers_Source_Code for more information on working with our external source repository.

Logging Ingres JDBC connections under tomcat

08-Jul-08

The Ingres JDBC driver, iijdbc.jar, has the capability to log the queries that pass through it. This is extremely useful for obtaining query timings as well as working out what goes between an application and the DBMS server. For example, below is a snippet of a trace obtained from Jira:

2008-07-08 10:04:12.319: Ingres-ResultSet[40296].next()
2008-07-08 10:04:12.319: Curs[40296].load()
2008-07-08 10:04:12.319: Curs[40296]: row cache ref=3, off=1, size=1, log=1, stat=0, row=2
2008-07-08 10:04:12.319: Curs[40296].load: AFTER
2008-07-08 10:04:12.319: Ingres-ResultSet[40296].next: false
2008-07-08 10:04:12.319: Ingres-Connection[2].commit()
2008-07-08 10:04:12.320: Conn[2]: end of transaction
2008-07-08 10:04:12.320: Ingres-ResultSet[40296].close()
2008-07-08 10:04:12.320: Curs[40296]: result-set closed
2008-07-08 10:04:12.320: Ingres-PreparedStatement[40293].close()
2008-07-08 10:04:12.320: Ingres-Connection[2].isClosed(): false
2008-07-08 10:04:12.320: Ingres-Connection[2].getAutoCommit(): false
2008-07-08 10:04:12.320: Ingres-Connection[2].isReadOnly(): false
2008-07-08 10:04:12.320: Ingres-Connection[2].rollback()
2008-07-08 10:04:12.320: Ingres-Connection[2].clearWarnings()
2008-07-08 10:04:12.320: Ingres-Connection[2].setAutoCommit( true )
2008-07-08 10:04:12.321: Ingres-Connection[2].setAutoCommit( true )
2008-07-08 10:04:12.321: Ingres-Connection[2].setAutoCommit( false )
2008-07-08 10:04:12.321: Ingres-Connection[2].prepareStatement(’SELECT ID, username, PASSWORD_HASH FROM….

As you can see the trace gives the timings down to the millisecond giving you a reasonable idea as to the relative (noting that logging will slow down things) speed of the queries passing through.

To enable this tracing create a file called iijdbc.properties with the following contents:

ingres.jdbc.trace.log=/tmp/iijdbc.log
ingres.jdbc.trace.timestamp=true
ingres.jdbc.trace.drv=5

Then place iijdbc.properties in to a directory that is part of the CLASSPATH. If you are running a standalone Java application, include the directory of iijdbc.properties in your CLASSPATH. Fire up the application and you should get JDBC log entries in the file specified in ingres.jdbc.trace.log.

When running under an application server such as Tomcat, you need to place this file in one of two places:

  • $CATALINA_HOME/common/classes - for system wide logging
  • $APP_HOME/WEB-INF/classes - Where $APP_HOME is the location of your application

Note that the latter will enable tracing for just one application rather than the whole instance of tomcat. Useful if you are trying to diagnose/trace a single application in an app server that hosts more than one application.

For more information on the contents of iijdbc.properties see http://docs.ingres.com/connectivity/JDBCDriverInterface and http://docs.ingres.com/connectivity/JDBCTracing.

Perl’s DBD-Ingres updated

16-May-08

It looks like someone else has taken over DBD-Ingres and put out a new release. According to the CHANGES the following updates were made:

- add missing timestamp types
- add workaround for do statements with placeholders
-> works for Ingres2006 R3

You can download the updated driver from http://search.cpan.org/CPAN/authors/id/S/SR/SREAGLE/DBD-Ingres-0.5201.tar.gz.

Navigating the Ingres source with … ctags

12-May-08

I recently discovered ctags, a program that generates a tag/index file for C, Java, PHP, Python, Ruby. For those new to the Ingres source ctags is an invaluable tool for navigating the Ingres source tree. Editors like vi and Emacs can use the generated tag file to allow the coder to go directly to the source for any Ingres function.

Here is how to setup ctags with Vim:

  1. Install ctags for your operating system
  2. Generate the tag file for the Ingres source:ctags -R -f ~/.vim/tags/ingres.ctags /home/grant/src/svn/ingres/main/
    • ~/.vim/tags/ingres.ctags is the target tag file. Windows: Use $HOME in place of ~
    • /home/grant/src/svn/ingres/main/ is the full path to the Ingres source tree. The path used needs to absolute and not relative since Vim will need to navigate from the current working directory to the file containing the function definition.
  3. Copy the following code into your $HOME/.vimrc:
    " Tag files
    set tags+=$HOME/.vim/tags/ingres.ctags
    " Ctrl+Right Arrow to goto source of function under the cursor
    map <silent><C-Left> <C-T>
    " Ctrl+Left Arrow to go back
    map <silent><C-Right> <C-]>
  4. Open any Ingres source file with Vim, say main/src/common/odbc/driver/connect.c
  5. Search for IIapi_initialize, somewhere around line 2276 (at least on my system)
  6. Place the cursor over the function IIapi_initialize and then press Control+Right Arrow/Cursor
  7. Vim should have loaded main/src/common/aif/aip/apiinit.c and placed the cursor on the following line (309):
    IIapi_initialize( IIAPI_INITPARM II_FAR *initParm )
  8. To go back to the previous file press Control+Left Arrow/Cursor

There you have it a simple way of navigating the Ingres source from the relative comfort of Vim.