I tried using it both as part of the database name as well as postgres://
URLs, but that doesn't work.
What works is to connect via JDBC first, using the options you want. If you
then start PgServer in the same process it will pick up the options.
We had another issue with the '/org/h2/server/pg/pg_catalog.sql' script not
being idempotent but being called more than once. It needs an additional
drop..if exists like this (line 110):
drop domain if exists regproc; -- new line
create domain regproc as varchar_ignorecase; -- old line that breaks
if called more than once
We'll create a pull request to get that fixed. But it's working for us with
a patched version now.
I'm still amazed what H2 can do: we are now talk from PHP via Postgres
driver to a Java database engine that pretends it's MS SQL :-) If this were
production it would be utter madness, but for our testing needs it's
On Thursday, October 13, 2016 at 9:08:48 PM UTC+10, Sergi Vladykin wrote:
> I guess this option must be a part of database URL.
>> After experimenting with DATABASE_TO_UPPER a bit more I realize it does
>> what we need, i.e. this all works:
>> create table CI_Sessions (id int);
>> insert into ci_sessions (id) values (1);
>> select * from "ci_sessions";
>> How do we set that option on a PgServer connection?
>> On Thursday, October 13, 2016 at 3:59:01 PM UTC+10, Peter Becker wrote:
>>> Sorry - I just realized there is
>>> https://groups.google.com/forum/#!topic/h2-database/bg_dGVT_XbA already.
>>> Given how quiet that has been I assume the feature doesn't exist. Can
>>> anyone give me an idea of how hard it would be to implement?
>>> On Thursday, October 13, 2016 at 3:43:21 PM UTC+10, Peter Becker wrote:
>>>> Hello all,
>>>> we are trying to do something a bit more unusual: use the PostgreSQL
>>>> wire protocol to talk to H2 as if it is a SQL Server. The reason behind
>>>> that is that we are migrating from PHP to Java and want to run integration
>>>> tests on top of H2. PHP seems to be capable of connecting to H2's PgServer
>>>> via it's Postgres driver, so this seems a viable approach to manage the
>>>> database state.
>>>> The issue we are facing is that the PHP code uses the table names in
>>>> different capitalizations compared to the database schema. SQL Server is
>>>> case-preserving, case-insensitive when it comes to table names (no matter
>>>> if the table name is quoted or not). This way it works in production, but
>>>> it doesn't work with H2. The queries the PHP code generates look like this:
>>>> INSERT INTO "ci_sessions" ("session_id", "ip_address",
>>>> "user_agent", "last_activity", "user_data") VALUES
>>>> ('e1a0a3cd8e2aa1473aac3c0a8b2c0237', '127.0.0.1', 'Mozilla/5.0 (X11; Linux
>>>> x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu
>>>> Chromium/53.0.2785.143 Chrome/53.0.2785.14', 1476334111, '')
>>>> This table is actually named "CI_Sessions", H2 produces "ERROR: Table
>>>> "ci_sessions" not found".
>>>> Is there an option to make H2 case insensitive on the table names? The
>>>> MSSQLServer mode doesn't seem to trigger a change in this regard.
>>>> Also: how do we control options on the PgServer connections? The syntax
>>>> using semicolons to append the options is something at least the psql
>>>> command line tool doesn't like.
>> You received this message because you are subscribed to the Google Groups
>> "H2 Database" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> To post to this group, send email to h2-da...@googlegroups.com
>> Visit this group at https://groups.google.com/group/h2-database.
>> For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "H2
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to email@example.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.