Tmr / h2database

Automatically exported from code.google.com/p/h2database
0 stars 0 forks source link

Further extensions to PgServer to support better support PG JDBC #481

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In order to test the patches I've been making to the PgServer implementation 
I've been using a combination of psql on the command-line + ExecuteQuery 
(http://executequery.org) via the JDBC driver. Both approaches will end up with 
various exceptions the deeper you go.

Some example queries that these tools make and ultimately fail:

* SELECT typinput='array_in'::regproc, typtype FROM pg_catalog.pg_type WHERE 
typname = $1
* SELECT relchecks, relkind, relhasindex, relhasrules, reltriggers <> 0, 
relhasoids, '', reltablespace
FROM pg_catalog.pg_class WHERE oid = '28'
* SELECT a.attname, pg_catalog.format_type(a.atttypid, a.atttypmod), (SELECT 
substring(pg_catalog.pg_get_expr(d.adbin, d.adrelid) for 128) FROM 
pg_catalog.pg_attrdef d WHERE d.adrelid = a.attrelid AND d.adnum = a.attnum AND 
a.atthasdef), a.attnotnull, a.attnum FROM pg_catalog.pg_attribute a WHERE 
a.attrelid = '28' AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum

Improving the compatibility layer to support these queries isn't difficult and 
simplifies developer testing.

It's my understanding that the goal of the PgServer is to implement the bare 
minimum required to give H2 ODBC support via the PG ODBC driver. If you're not 
wanting to go further than this baseline then I understand that you may want to 
mark this ticket as "Won't Fix".

Original issue reported on code.google.com by arbfrank...@gmail.com on 24 Jun 2013 at 5:39

Attachments:

GoogleCodeExporter commented 9 years ago
To help with the review of the patch I have annotated which queries are 
associated with the various components of the pg_catalog.sql changes in: 
http://github.com/arbfranklin/h2database/commit/0e5fa157eb1f2298578aa40171920a7d
b2fe89e1.

Original comment by arbfrank...@gmail.com on 24 Jun 2013 at 5:53

GoogleCodeExporter commented 9 years ago
Looks reasonable to me. Patch applied. Thanks for all your hard work!

Original comment by noelgrandin on 25 Jun 2013 at 9:38