Planet Ingres

July 03, 2009

Alan Raison - Ingres New Features

I recently learnt that Ingres 9.2 has introducted the facility to restrict the rows returned from a query by specifying an offset.

Where previously you would only be able to select the first n rows:
SELECT FIRST n col_name FROM table WHERE col_name = 'value';

There is now an "OFFSET" clause:
SELECT FIRST n col_name FROM table WHERE col_name = 'value' OFFSET m;

I went about implementing this in OpenJPA, but found that this dual-location for the Select Range specification was going to cause trouble, so I'd have to override a core method. The problem with that was that the method in question was marked "private", so an override wouldn't have the desired effect! I posted on the developer mailing list about this and they had no problem to me opening up the access, but then I heard about another syntax:

SELECT col_name FROM table WHERE col_name = 'value' OFFSET m FETCH FIRST n ROWS ONLY;

(FIRST can also be replaced by the keyword "NEXT")

This solved my problems, as I was able to specify the range at the end of the query; OpenJPA had a constant for specifying this position (DBDictionary.RANGE_POST_SELECT).

I had a quick play with this new syntax, wondering what
SELECT FIRST x col_name FROM table OFFSET y FETCH NEXT z ROWS ONLY;
would do. Fortunately Ingres prevented me from mixing the FIRST and FETCH FIRST z tokens in a single statement!

There's always loads of new features being added to Ingres; these were added in the 9.2 release. For a summary of the new features in a given release, see the Release Summary document; this is currently available for Ingres 9.2 on docs.ingres.com.

by Alan.Raison at July 03, 2009 10:30 AM

June 30, 2009

Grant Croker - PHP Ingres 2.2.1 released

The last release of the PHP driver introduced a regression where by the “EXECUTE PROCEDURE” or “CALL” SQL statements would fail to execute (PECL bug 16688). The bug slipped through the net due to missing tests for database procedures. This oversight has now been resolved and the fix has been rolled into a new release, 2.2.1. If you build the driver from source you can get the updated code from http://pecl.php.net/get/ingres. Windows users can download the php_ingres.dll from http://esd.ingres.com/product/drivers/PHP/Windows_32-Bit/PHP_Driver/. The Windows download includes the DLLs for PHP 5.3.0, released earlier today.

Related Posts

by grant at June 30, 2009 08:58 PM

Grant Croker - PHP 5.3.0 released

Just a quick note to say that PHP 5.3.0 has been released. DLLs for PHP 5.3.0 and Ingres are in the process of being built and should be up on http://esd.ingres.com within the next 24 hours.

Related Posts

by grant at June 30, 2009 02:29 PM

June 26, 2009

Grant Croker - UK Ingres Users Association - Committee Vacancy

Re-posting from comp.databases.ingres on behalf of the UK IUA

A vacancy has opened up on the UK Ingres Users Association committee.

If you would like to be involved with the most energetic and
successful Ingres user-group in the world, we want to hear from you.

We have a number of projects under way, including our hugely successful
annual conference that you all know about, plus we are organizing open
source bootcamps up and down the UK. We are also embarking in a refresh
of our web infrastructure to improve our ability to communicate with
members and to provide value.

If you have any ideas for what you’d like to see done better, different
or more, and you are motived to help it happen, please let us know by
emailing info[at]ukiua[dot]org[dot]uk.

We would especially like to hear from anyone who is new to the Ingres
family of products.

Related Posts

by grant at June 26, 2009 10:01 AM

Nikos Vaggalis - Unrar Extract and Recover : Referers

<img src="http://feeds.feedburner.com/~r/Perlingresprogramming/~4/6sYCFg5lhMs" height="1" width="1"/>

by nikos.vaggalis@gmail.com (Nikos Vaggalis) at June 26, 2009 05:15 AM

June 25, 2009

Nikos Vaggalis - Unrar Extract and Recover : Project description

<img src="http://feeds.feedburner.com/~r/Perlingresprogramming/~4/kms93f-ycFI" height="1" width="1"/>

by nikos.vaggalis@gmail.com (Nikos Vaggalis) at June 25, 2009 09:55 AM

Nikos Vaggalis - Unrar Extract and Recover : Project details

<img src="http://feeds.feedburner.com/~r/Perlingresprogramming/~4/PtXwmkuEEhA" height="1" width="1"/>

by nikos.vaggalis@gmail.com (Nikos Vaggalis) at June 25, 2009 06:45 AM

June 24, 2009

Fred Gallagher - Podcast - The Era of Open Source Databases

A lot can be learned about the current recession by looking at the recession that took place in 2001. By understanding the impact that recession had on technology, we can gain some insight into how things may play out as this recession starts to ease. In the final episode of our three part podcast series, we [...]

by Fred Gallagher at June 24, 2009 04:53 PM

Alan Raison - Getting into OpenJPA

A while ago we were approached by a company using OpenJPA for their product wanting us to help them port it to Ingres. It fell to me to do the work and it ended up being really interesting, so I thought I'd share some of the progress that's been made.

JPA is a "Persistence Framework" for Java, meaning a way to store a program's data, usually represented in an application as objects, into a database. OpenJPA is the Apache Foundation's implementaion of this framework. Its design allows for the underlying datastore to be easily changed with minimal reconfiguration - and no recoding. This is exactly the sort of vendor-neutral design that we strive for at Luminary and so getting Ingres support would be really useful for the whole community.

The initial development went well and the company have been using their product against Ingres for a little while now, so it seems to do the trick! It will soon be submitted to the Apache Foundation as part of the main OpenJPA build but there's still a few bugs to iron out.

The really interesting part of the development was looking inside the Ingres JDBC driver and getting to know some of the Ingres development team who look after it.

by Alan.Raison at June 24, 2009 04:24 PM