Re: [h2] We have a problem with Triggers

2019-02-06 Thread Kerry Sainsbury
> > BUT the insertion in the table "log" in "fire" is done BEFORE the > insertion in XXX. How do you know? AFTER INSERT is still running in the transaction. I'd guess (and I know almost nothing about this) that your "log" table insert is occurring in a different transaction that commits before

Re: [h2] CSVREAD - New JDBC CSV Driver to read large CSV file (greater than 1Go) without performance issue

2019-01-17 Thread Kerry Sainsbury
You should mention where your jdbc driver can be found... On Fri, 18 Jan 2019, 02:46 Guillaume de GENTILE < guillaume.degent...@gmail.com wrote: > Hi all, > > First of all I am an h2 fan since years. > Its embedded CSVREAD function is fantastic for reading CSV or flat files, > however it has

Re: [h2] Requesting guidance on RCE issue remediation

2018-11-02 Thread Kerry Sainsbury
It might be worthwhile to read about the tyranny of the default. https://pagefair.com/blog/2015/the-tyranny-of-the-default/ On Sat, 3 Nov 2018, 04:39 <0xd...@gmail.com wrote: > Agreed, it's best to have secure defaults. Thanks! > > On Friday, November 2, 2018 at 2:06:55 AM UTC-4, Noel Grandin

Re: [h2] i want to know maximum value of page size in h2 database

2018-10-12 Thread Kerry Sainsbury
t; am confusing * > > On Saturday, October 13, 2018 at 4:07:21 AM UTC+9, Kerry Sainsbury wrote: >> >> Best thing to do is to try it and see if it helps your use case. Will you >> be doing more reading, or writing? Small amounts of data or large? >> >> Try it yourself. &

Re: [h2] i want to know maximum value of page size in h2 database

2018-10-12 Thread Kerry Sainsbury
Best thing to do is to try it and see if it helps your use case. Will you be doing more reading, or writing? Small amounts of data or large? Try it yourself. On Sat, 13 Oct 2018, 05:08 Philip Yoon, wrote: > i have two question > > *first one* is about page size > > i know the default page

Re: [h2] Re: TO_DATE and TO_TIMESTAMP are in version 1.4.191 but not mentioned in the change log

2018-09-04 Thread Kerry Sainsbury
I may regret this, but because I used to work for Sita I will be nice :-) Try removing the definition of the 'TO_DATE' alias that you are creating. Delete these two lines: String toDataAlias = "CREATE ALIAS to_date FOR \"aero.sita.gsl.irisk.core.utils.RiskDataEmbeddedDatabaseFuncti

Re: [h2] CVE-2018-10054

2018-08-09 Thread Kerry Sainsbury
Fair enough! That sounds to me like the hole that needs to be blocked. On 10 August 2018 at 07:29, Delta wrote: > You need admin, but you can gain such privileges by just creating new db > and for this you dont need to be admin. > > чт, 9 авг. 2018 г. в 22:21, Kerry Sainsbury : >

Re: [h2] CVE-2018-10054

2018-08-09 Thread Kerry Sainsbury
I would say that it can be dealt with by the user already. 1. Apparently "Admin rights are required to execute this command" -- therefore only give admin rights to users who should have them. 2. Also, you can constrain the classes that can be loaded via h2.allowedClasses

Re: [h2] Error while starting Server for ODBC-Connect

2018-07-22 Thread Kerry Sainsbury
h2*.jar does not work -- you need to use the actual filename, eg: java -cp h2-1.4.196.jar org.h2.tools.Server On 23 July 2018 at 01:58, Thomas wrote: > Hello, > > I want to setup the ODBC-Connection to H2 to connect a database with > MS-Access. Therefore I followed the manual at

Re: [h2] Do not return table name in result set

2018-05-10 Thread Kerry Sainsbury
It will be a discrepancy between what Oracle return in ResultSetMetaData vs H2. I'd guess it's using 'getColumnLabel', which is a bit more loosely defined. On 10 May 2018 at 12:18, Ben Frey wrote:

Re: [h2] Operation not supported for table "Table Name" when there are views on the table

2018-05-04 Thread Kerry Sainsbury
You are running an ANCIENT version of h2. I removed that limitation in 2009! On 5 May 2018 at 02:59, wrote: > Hello, > > I hope someone can help me. I have a NUXEO application and It creates > fields from schemas when the application is initialized. I have

Re: [h2] How to restore h2 database

2018-05-01 Thread Kerry Sainsbury
Are you restoring into an empty database? On 2 May 2018 at 15:17, Syed Nabi wrote: > How to restore a backup of h2 database in java. I store the backup on > > statement.execute(String.format("SCRIPT TO '%s'","path.sql")); > > but I don't know how to restore this backup I

Re: [h2] compacting an embedded h2 database

2018-01-27 Thread Kerry Sainsbury
Is it feasible to create a new empty database? On 26 January 2018 at 01:53, Famco wrote: > I am using the database in embedded mode, so trieing to execute "shutdown > compact" does not work (I waited 15 minutes on an 1GB File) > For me it looks like H2 is NOT reusing empty

Re: [h2] Data Inconsistencies between H2 DB and the generated SQL

2018-01-27 Thread Kerry Sainsbury
The column with the 'wrong' value is not an auto-increment column, so auto-increment isn't likely to be the problem. Most likely explanation is that something else has changed parent_id from 6 to 2, after the original insert. On 25 January 2018 at 15:50, Anerudh Balaji

Re: [h2] is it save to use H2 in production for applications like Accounting or Stock?

2017-10-24 Thread Kerry Sainsbury
I love H2, but I wouldn't use it for an Accounting system because it just doesn't seem "battle hardened" enough yet; I see the word "corrupt" too often in this group :-( For something that needs to be free, rock-solid, for the storage of financial data, I'd go with Postgresql, although it does

Re: [h2] H2 trying to access "/private/var/empty/test.trace.db",

2017-10-18 Thread Kerry Sainsbury
Maybe Tomcat changed your current folder? http://www.h2database.com/html/features.html describes test.trace.db (I am no expert, just did a Google search) On 19 October 2017 at 03:34, Ronald Marin wrote: > Thanks Noel, but not I did not change my current folder to that.

Re: [h2] How to use IS NULL in H2 database

2017-09-26 Thread Kerry Sainsbury
You have inserted the string literal 'null', not the SQL value null. On 27 September 2017 at 05:44, Christian MICHON wrote: > C='null' or C=null? > > The single quotes might have strong effect here... > > -- > You received this message because you are subscribed to

Re: [h2] Performance improvement advice

2017-09-22 Thread Kerry Sainsbury
I am no kind of an expert, but could you try splitting the import file into pieces and doing multiple imports concurrently? Although it would make the import process significantly more complicated, and wouldn't improve the index creation at all, so perhaps isn't worth the effort. On 22 September

Re: [h2] How to connect to oracle xe database using H2 console

2017-08-08 Thread Kerry Sainsbury
Start by googling the error message On 9 August 2017 at 05:35, Baban Chakraborty wrote: > How to connect to oracle xe database using H2 console > > I am trying to connect oracle xe database > getting error Class "oracle.jdbc.driver.OracleDriver" not found >

Re: [h2] Loop in Hierarchical Queries / Common Table Expressions in H2 Database

2017-07-05 Thread Kerry Sainsbury
I can't help in any way, but suggest you post plain text rather than screen shots -- it's a lot easy to copy/paste the faulty SQL ;-) On 4 July 2017 at 21:45, Ashif Ahamed wrote: > > > > Can anyone help on solving this scenario in H2 recursive queries.. > > > > >

Re: [h2] Re: Bug in H2 (1.4.195 and 1.3.176) concerning column names CHECK or CONSTRAINT

2017-05-29 Thread Kerry Sainsbury
In my tradition of short-term dodgy workarounds, your validation logic could be, rather than checking a list of hard-coded keywords: try { CREATE TEMP LOCAL TABLE VALIDATE_INPUT( ${value-user-typed-in} INT) // validation passed! DROP TABLE VALIDATE_INPUT } catch (SQLException)

Re: [h2] Split DB based on Date

2017-05-18 Thread Kerry Sainsbury
mbine data from DB of > different dates and perform search on that. > > Thanks, > Naren. > > On Wednesday, May 17, 2017 at 7:01:45 PM UTC-4, Kerry Sainsbury wrote: >> >> As you observe, the documentation doesn't talk about it. Where did you >> see it mentioned? I c

Re: [h2] Split DB based on Date

2017-05-17 Thread Kerry Sainsbury
As you observe, the documentation doesn't talk about it. Where did you see it mentioned? I can't really even imagine how it would work; what happens to 'today' rows that have a foreign key reference to a 'yesterday' row when you delete the 'yesterday' files? Eek! Given your actual objective I'd

Re: [h2] Multi Return Fields in Generated Keys

2017-04-18 Thread Kerry Sainsbury
On 19 April 2017 at 03:37, Juan Ismael Vasquez wrote: > getGeneratedKeys I wonder how Oracle is deciding that "GUID" RAW(16) DEFAULT RANDOM_UUID() is a key -- it's doing quite a bit of introspection and making of assumptions. I would've thought that H2 was

Re: [h2] Incompatibility for rename column

2017-04-14 Thread Kerry Sainsbury
I was interested, so I did some googling. It seems clear that the SQL standards don't mention a 'rename column' command, so neither H2 nor Postgres is wrong (or right!). A book (SQL Clearly Explained) I came across suggested "ALTER TABLE TEST RENAME COL1 TO COL2" was "correct", while Mysql is

Re: [h2] H2 Database corruption : java.lang.RuntimeException: old!=record pos:196012 old:page[196012] data leaf overflow parent:196011 next:0 new:page[196012] data leaf table:10 T10 entries:0 parent:1

2017-03-30 Thread Kerry Sainsbury
I thought the current wisdom was that MCC and 1.3 aren't recommended: http://www.h2database.com/html/advanced.html#mvcc states "The MVCC feature is not fully tested yet" and "the complete undo log (the list of uncommitted changes) must fit in memory" -- You received this message because you

Re: [h2] Schema "XXXX" not found; SQL statement: GRANT SELECT ON SCHEMA XXXX TO USERX [90079-192]

2017-02-19 Thread Kerry Sainsbury
Presumably Squirrel-sql is sending "GRANT SELECT ON SCHEMA TO USERX" to H2, which is now an error because you've renamed to , but not told Squirrel-sql about it. That's not H2's problem -- you need to reconfigure Squirrel-sql somehow. (I can't help. I use SQL-Workbench/J) -- You

Re: [h2] Last chance SQL editing in JDBC + fooling DBProduct name

2017-01-17 Thread Kerry Sainsbury
My cunning idea would be to not put this into H2 at all. Instead create your own JDBC Driver (it's not that hard -- I've written one) that delegates to a "real" JDBC Driver. That way you can tell the client app any lies you like. A quick Google reveals this example

Re: [h2] Re: SSL error

2016-06-01 Thread Kerry Sainsbury
google "h2 SSLHandshakeException" On 2 June 2016 at 08:22, Subhash Agrawal wrote: > Thanks Manfred. > I have couple of follow-up questions on this. > 1. What was the problem and how was it fixed? > 2. How stable is 1.4.192-beta build is? When is public release planned for

Re: [h2] Help with proper data formatting - Rookie needs a little help

2016-05-29 Thread Kerry Sainsbury
You stand a better chance of getting some help if you provide the DDL for the L_LUNCHES and L_EMPLOYEES tables. On 29 May 2016 at 18:19, Kent Sands wrote: > Anyone please help? > > I have all of my database tables created and have run into problems > running INSERT

Re: [h2] Re: H2 User Defined Functions

2016-05-22 Thread Kerry Sainsbury
Although, to answer your question. yes it does: http://www.h2database.com/html/features.html#user_defined_functions eg: CREATE ALIAS NEXT_PRIME AS $$ String nextPrime(String value) { return new BigInteger(value).nextProbablePrime().toString(); } $$; On 23 May 2016 at 08:25, Kerry

Re: [h2] Re: H2 User Defined Functions

2016-05-22 Thread Kerry Sainsbury
Six years ago (gasp!) I wrote a patch for H2 that did this. You can read the conversation here . Weirdly, I can't remember what happened in the end, or why it never got merged into trunk. I feel like a new project, so maybe I'll

Re: [h2] Re: Create keystore for H2 SSL connection

2016-05-18 Thread Kerry Sainsbury
Can't you use a free certificate from the EFF's "Let's Encrypt" project? https://letsencrypt.org/ On 11 May 2016 at 07:00, Tomas Pospichal wrote: > In case you want just the encryption (without server authentication), you > do not need any certificates for your h2 server,

Re: [h2] Java connection with H2 database using JDBC

2016-05-18 Thread Kerry Sainsbury
I'd bet different connection URLs. On 17 May 2016 at 21:30, wrote: > Hello, > > I have tried connecting to H2 database using JDBC and execute a > query for table creation and retried to create a new table using the same > name and I got an error saying table "x "

Re: [h2] To which H2 version should we update in productive environments

2016-01-07 Thread Kerry Sainsbury
Am Montag, 7. Dezember 2015 12:46:12 UTC+1 schrieb Thomas Mueller: > > Hi, > > 1.4 is still beta because of the new MVStore storage engine. If you > disable that, then I consider it stable. Just append ";mv_store=false" to > the database URL. > > Regards, > Thomas > > On 8 January 2016 at 11:04,

Re: Various strange error messages

2011-03-27 Thread Kerry Sainsbury
Errors 1 2 sounds like physical read errors to me. Maybe the disk is stuffed? On Sun, Mar 27, 2011 at 11:09 PM, Thomas Mueller thomas.tom.muel...@gmail.com wrote: Hi, Yes, this is strange. Unfortunately, I can't help you, because I can't reproduce the problem. If I was you, I would

Re: Performance dramatically slower on left join

2010-11-10 Thread Kerry Sainsbury
Back in the day with Informix we were always rearranging the order in which tables were listed, and I remember repeating certain columns in WHERE clauses as a way to encourage the optimiser to use a particular index. On Thu, Nov 11, 2010 at 12:26 PM, kensystem kensys...@gmail.com wrote: Ah,

Re: Triggers and Functions in Groovy, or Javascript, or Java, or any BSF language...

2010-11-08 Thread Kerry Sainsbury
Hi Thomas, I'll go ahead and tidy it up a bit, and see if I can break it down into smaller patches, although that might be tricky. Mostly the change is about rearranging the code to make it language-pluggable -- Groovy support is wrapped up in a couple of independent files. Cheers Kerry I had

Re: Triggers and Functions in Groovy, or Javascript, or Java, or any BSF language...

2010-11-06 Thread Kerry Sainsbury
if you want the less brittle syntax it offers. Cheers Kerry On Sat, Nov 6, 2010 at 8:03 AM, Kerry Sainsbury ke...@fidelma.com wrote: I'm quite sure it must be slower, but I haven't measured anything. I'll put something together and see. On Sat, Nov 6, 2010 at 12:40 AM, Sergi Vladykin

Triggers and Functions in Groovy, or Javascript, or Java, or any BSF language...

2010-11-05 Thread Kerry Sainsbury
Hi Folks, I've done the unthinkable and implemented non-Java based aliases and triggers. With my patch you can now use Java, or any BSF-supported language, or if you use Groovy you get what is (to me) a much more user-friendly syntax -- one like many other database engines use. I've been

Re: Triggers and Functions in Groovy, or Javascript, or Java, or any BSF language...

2010-11-05 Thread Kerry Sainsbury
I'm quite sure it must be slower, but I haven't measured anything. I'll put something together and see. On Sat, Nov 6, 2010 at 12:40 AM, Sergi Vladykin sergi.vlady...@gmail.com wrote: Hi, This looks like a very inetersting feature for increasing developer productivity but did you any

Re: Triggers and Functions in Groovy, or Javascript, or Java, or any BSF language...

2010-11-05 Thread Kerry Sainsbury
Agreed. I've tried to make the code plug-and-playable, so it should fit into any such framework easily. Of course as it stands now you can run H2 standalone, without the Groovy jar (or anything else), and it'll still behave as it always has. On Sat, Nov 6, 2010 at 12:42 AM, Rami Ojares

Re: How to contribute to this project.

2010-10-26 Thread Kerry Sainsbury
Hi Akash, Just do what I did -- download the code, add some functionality you want, then post a patch to this list. Here are some general instructions: http://www.h2database.com/html/build.html You can find the code here: http://code.google.com/p/h2database/source/checkout If you don't have any

Re: H2 website blocked in Turkey?

2010-10-17 Thread Kerry Sainsbury
Does http://h2database.com work for you? We had some problems at my office where we could get to http://h2database.com but not http://ww.h2database.com This was due to a QOS setting in some piece of out networking infrastructure. Cheers Kerry On Mon, Oct 18, 2010 at 4:23 AM, Steve McLeod

Re: Help me pls, pls : help me god

2010-10-13 Thread Kerry Sainsbury
Is it presumptuous to assume that God uses H2? uugaa: I think we need more information. On Thu, Oct 14, 2010 at 4:35 AM, Rami rami.oja...@gmail.com wrote: Did god help you? - Rami uugaa wrote: Help me help me pls multi connection Server app it's true

Re: NullPointerException when querying view in Grails

2010-10-12 Thread Kerry Sainsbury
Just to make life a little easier for Thomas, could you forward the DDL for your various tables (vulnerabilites, some_table and acme) so he has a self-contained test to run that illustrates the problem. On Wed, Oct 13, 2010 at 9:54 AM, Chris christian.h...@gmail.com wrote: After some

Re: Importing Source code in eclipse ?

2010-10-08 Thread Kerry Sainsbury
On Fri, Oct 8, 2010 at 7:52 PM, Sergi Vladykin sergi.vlady...@gmail.comwrote: @Kerry I hate Eclipse. Whenever I try to use the damned thing it spits out all sorts of nonsense, and breaks in mysterious ways. I don't hate IDEA just find eclipse more convenient for me. If it doesn't work

Re: Importing Source code in eclipse ?

2010-10-07 Thread Kerry Sainsbury
Just FYI I don't think that the ant script gets much use and/or love, so it may not be 100% right. Should be a good start though. 2010/10/8 stolyarchukav stolyarchu...@gmail.com Checkout from SVN repositiry http://h2database.googlecode.com/svn/trunk/h2/ Ant script - build.xml located into

Re: Importing Source code in eclipse ?

2010-10-07 Thread Kerry Sainsbury
/build.html#providing_patches Hope this helps. Cheers Kerry PS: Eclipse is evil (or perhaps it just doesn't like me) 2010/10/8 Rahul Navinchand rahulnc1...@gmail.com so what would be the best approach for a n00b ?? On Oct 7, 3:55 pm, Kerry Sainsbury ke...@fidelma.com wrote: Just FYI I don't think

Re: Importing Source code in eclipse ?

2010-10-07 Thread Kerry Sainsbury
with that? On Oct 7, 7:38 pm, Kerry Sainsbury ke...@fidelma.com wrote: Use your IDE as an editor, but use the H2 build script to compile and run your tests. Try this to get started: 1. Download various jars and start running the tests: - download the source into a h2 directory - cd

Re: client/server: h2 temp files creation on client's execution direcotry fails

2010-10-06 Thread Kerry Sainsbury
I'm no expert, but I took a quick look at the code and can see a method in FileSystemDisk called createTempFile that looks like it *could* be where the change is needed. There's a line that reads: if (inTempDir) { dir = null; ... I suspect you want it to be dir =

Re: How to get rank

2010-10-02 Thread Kerry Sainsbury
: Assume I've a table game: id---PlayerName---Score 1joe 1500 1jack 1100 1john 900 1steve 100 1bob 1000 the rank of joe will be 1, bob 3 ... On Oct 2, 1:08 pm, Kerry Sainsbury ke

Re: COLLATION order question

2010-09-28 Thread Kerry Sainsbury
On Wed, Sep 29, 2010 at 5:24 AM, clint clinthyd...@gmail.com wrote: yeah, that's a little too obvious... it has a built-in assumption that doesn't apply to my data: that I do/ can have exhaustive a priori knowledge of the set of values. Well your request for help did say I have a table that

Re: COLLATION order question

2010-09-27 Thread Kerry Sainsbury
Assuming your table is called some_data, and has a column called month, you could do one of the following: Option 1: (The traditional solution -- Join to a months table) create table months(month varchar(15), sortvalue int); insert into months(month , sortvalue) ('January', 1); insert into

Re: I get the following error: Connection is broken [90067-113]

2010-09-27 Thread Kerry Sainsbury
the suffix ,113 in your example, represents the version of H2 you are running. Version 1.1.113 (2009-05-21) http://code.google.com/p/h2database/downloads/detail?name=h2-2009-05-21.zipcan=2q= Cheers Kerry On Tue, Sep 28, 2010 at 1:33 PM, Dror dro...@hotmail.com wrote: I know lots of the

Re: Stored Procedure with CallableStatement

2010-09-26 Thread Kerry Sainsbury
On Mon, Sep 27, 2010 at 10:01 AM, Sergi Vladykin sergi.vlady...@gmail.comwrote: It seems that CallableStatements are not supported. Do you really need them? It looks to me like he's trying to find a way to call arbitrary bits of code from a trigger. Currently the easiest way is to put the

Re: Binary Primary Key

2010-08-30 Thread Kerry Sainsbury
Binary data types as keys would make using database tools for adhoc queries practically impossible. That alone is enough to throw out the idea for me. In my world primary keys should always be meaningless, so an INT should always be just fine. Your binary fields don't sound meaningless to me, so

Re: H2 embedded Java suggestion

2010-08-25 Thread Kerry Sainsbury
Hi Thomas, Are you happy, enough, with the following -- as described in an earlier email: 1. Use this syntax to define a code module: CREATE MODULE WIBBLE AS $$ import java.sql.*; public class MyNotWibbleCode ... $$ but the classname is completely

Re: H2 embedded Java suggestion

2010-08-18 Thread Kerry Sainsbury
at letting you change values :-) Maybe we should add a second TriggerAdapter with arrays? As you know, I support anything that reduces the code required to write a simple trigger! Cheers Kerry Regards, Thomas On Thu, Aug 5, 2010 at 6:25 AM, Kerry Sainsbury ke...@fidelma.com wrote

Re: H2 embedded Java suggestion

2010-08-18 Thread Kerry Sainsbury
we *could* in the future, if you wanted to, support non-Java-based syntax more easily. Agreed? Cheers Kerry On Thu, Aug 19, 2010 at 8:51 AM, Kerry Sainsbury ke...@fidelma.com wrote: Hi Thomas, On Thu, Aug 19, 2010 at 5:35 AM, Thomas Mueller thomas.tom.muel...@gmail.com wrote: Hi, I

Re: H2 embedded Java suggestion

2010-08-18 Thread Kerry Sainsbury
proprietary languages. Anyway, thanks for the feedback! Cheers Kerry But maybe there is a use case I have not considered. - rami On 19.8.2010 2:56, Kerry Sainsbury wrote: I've thought about this a bit more, and wanted to advocate for including the module name in the CREATE MODULE command

Re: Dropping anonymous indexes?

2010-08-18 Thread Kerry Sainsbury
What happens when you try to drop them? Do you get an error message? This works ok for me: create table blah(id int, name varchar); create index on blah(name); select INDEX_NAME from INFORMATION_SCHEMA.indexes where table_name = 'BLAH' drop index INDEX_1 -- (where INDEX_1 is the value returned

Re: full text search errors

2010-08-15 Thread Kerry Sainsbury
Does anybody have a recommended version of Lucene that Clint should use with H2? It feels like lots of different versions have been tried at this point, so I'm not surprised if things have gotten a bit confused. Cheers Kerry On Mon, Aug 16, 2010 at 3:27 AM, clint clinthyd...@gmail.com wrote:

Re: full text search errors

2010-08-12 Thread Kerry Sainsbury
that the internal text search is going to work...but it still complains about lucene... and no matter what, this seems not to run on my friend's server, which is where I need it to end up, so that it's on the web. -- clint On Aug 11, 4:45 pm, Kerry Sainsbury ke...@fidelma.com wrote: Hi Clint

Re: full text search errors

2010-08-11 Thread Kerry Sainsbury
Hi Clint, Maybe you could provide the specific steps you are following so we could perhaps reproduce the problem? What version of H2 are you using? Also, what do you mean specifically by lucene is worse...that doesn't work anywhere -- do you have actual error messages? Thanks Kerry On Thu, Aug

Re: Mac OS X Widget and H2

2010-08-06 Thread Kerry Sainsbury
What about embedding H2 in your own Java web app, and writing some appropriate methods in your web app that your Javascript can call via DWR? http://directwebremoting.org/dwr/index.html Cheers Kerry On Sat, Aug 7, 2010 at 1:42 AM, Andreas Henningsson andreas.hennings...@gmail.com wrote: Yes

Re: Getting primary key of affected row after MERGE

2010-08-05 Thread Kerry Sainsbury
To answer the second part of your question, IDENTITY columns do default to start at 1 and increment by 1. I notice that it doesn't seem to be documented anywhere, but you actually define the start and increment values when you define the IDENTITY column, like this: create table blah(id

Re: Range of values in SELECT * LIKE

2010-08-05 Thread Kerry Sainsbury
I think you want to use REGEXP rather than LIKE: create table blah(name varchar(10)); insert into blah (name) values ('adam'); insert into blah(name) values ('bill'); insert into blah(name) values('erin'); select * from blah where name regexp '^[aeiou]'; I don't know why LIKE doesn't work

Re: H2 ARRAY data type and Hibernate

2010-08-04 Thread Kerry Sainsbury
I don't know for sure, but what about mapping the array in Hibernate as SERIALIZABLE ? On Thu, Aug 5, 2010 at 10:31 AM, good...@essence.co.uk good...@essence.co.uk wrote: I guess one option is to have the array data in a separate table with an ARRAY column and a foreign key, and handle any

Re: H2 embedded Java suggestion

2010-08-04 Thread Kerry Sainsbury
Hi Thomas, How do you like this example. It's very simple. Basically you copy and paste Java code and call it a MODULE. The class can then be called from whatever wants it (and I can easily implement my simpler trigger idea just by putting in a SimpleTrigger class that I can extend in another

Re: JASPA (JAva SPATial) for PostgreSQL and H2 released

2010-07-23 Thread Kerry Sainsbury
Is it really GPL? Any code I write that uses JASPA must also be GPL'ed? Shouldn't it be LGPL? 2010/7/24 Jose C. Martinez-Llario jomar...@cgf.upv.es (sorry for the cross posting) * text in english ** After one year of development, we are pleased to

Re: H2 embedded Java suggestion

2010-07-18 Thread Kerry Sainsbury
Hi Team, Thomas has had a look at a first cut of the embedded Java code and wanted to open the discussion out to include you folks. In the current version I have tried to do two primary things: 1. Add the ability to embed Java code into the database, instead of forcing it to be on the

Re: Function field expression reference

2010-07-14 Thread Kerry Sainsbury
I don't quite understand. Do you want to do something like this: public String myFunction(Value value) { if (value.getTable.getName().equals(MyTable)) { return AAA + value.getText(); } else { return BBB + value.getText(); } } That is: Your function wants to know

Re: Working with in memory db

2010-07-02 Thread Kerry Sainsbury
For what it's worth, I too just edit text files. Visual tools tend to ignore things like source control, and are lousy at doing diffs between versions of a single database. On Fri, Jul 2, 2010 at 9:42 PM, Thomas Mueller thomas.tom.muel...@gmail.com wrote: Hi, I want to create this

Re: H2 app. in netbeans doesn't run

2010-06-29 Thread Kerry Sainsbury
I've no personal experience, but this documentation may help: http://h2database.com/html/tutorial.html#using_toplink On Wed, Jun 30, 2010 at 6:22 AM, denis000 dc4...@gmail.com wrote: Hi, I created a table in netbeans 6.9 on h2. I can view this table and its data in the netbeans. Then i crated

Re: PostgreSQL - H2 data migrations

2010-06-28 Thread Kerry Sainsbury
sql-workbench has a reasonable data migration tool that might help: http://www.sql-workbench.net/manual/data-pumper.html http://www.sql-workbench.net/manual/data-pumper.htmlCheers Kerry On Tue, Jun 29, 2010 at 2:07 AM, johnba...@gmail.com johnba...@gmail.comwrote: Hello. I like H2 and want to

Re: Using H2 with JUnit tests to test a web service

2010-06-25 Thread Kerry Sainsbury
Are you saying that your test and your webservice need to talk to the same database? In that case, don't you need to need to use similar connection strings. Instead of jdbc:h2:mem: + DATABASE_NAME Try this: jdbc:h2:tcp://localhost/mem: + DATABASE_NAME Seems plausible to me -- but I haven't

Re: Using H2 with JUnit tests to test a web service

2010-06-25 Thread Kerry Sainsbury
://localhost in that url. (The name of the variable is testing in the web service and DATABASE_NAME in the testcase.) Quote: con = DriverManager.getConnection(jdbc:h2:tcp://localhost/mem: + testing + ;IFEXISTS=TRUE); Marie On Jun 25, 5:45 am, Kerry Sainsbury ke...@fidelma.com wrote: Are you

Re: Help to connect to tcp server, [90067-134] session closed

2010-06-25 Thread Kerry Sainsbury
Can you client machine connect to the server machine via telnet? telnet 192.168.0.2 9092 Does this fail immediately, or does it connect? On Thu, Jun 24, 2010 at 11:36 AM, blow all...@gmail.com wrote: Hi all, i have some torubles to connect to my tcp remote server. I'm starting server with

Re: H2 embedded Java suggestion

2010-06-24 Thread Kerry Sainsbury
deployment option. Creating a whole new programming language is a little outside of the scope of my suggestion, but as Thomas likes to say patches are welcome :-) Cheers Kerry On Thu, Jun 24, 2010 at 6:20 PM, Brish bris...@gmail.com wrote: On Jun 23, 10:41 pm, Kerry Sainsbury ke...@fidelma.com wrote

Re: H2 embedded Java suggestion

2010-06-24 Thread Kerry Sainsbury
at 12:19 PM, Kerry Sainsbury ke...@fidelma.com wrote: Hi, I see what you're saying. I guess all I'm offering is another way to package the Java code that H2 already supports. You can add it to the classpath, like you do now, or you can put it inside the database. The functionality

Re: www.h2database.com is down a lot?

2010-06-23 Thread Kerry Sainsbury
Just to let you know that it's some kind of DNS networking problem related to the office that I work in. No need to worry at your end :-) On Wed, Jun 23, 2010 at 5:55 PM, Thomas Mueller thomas.tom.muel...@gmail.com wrote: Hi, It's not down for me (it never was down for me). I recently try to

H2 embedded Java suggestion

2010-06-23 Thread Kerry Sainsbury
Hi Folks, I've been looking at triggers recently and was surprised to see that we can't define Java code to execute as part of a trigger. Note that we *can* use Java code, but we can't embed it in the trigger definition like we can with an ALIAS. Would it be a good thing if we could store any

Re: H2 embedded Java suggestion

2010-06-23 Thread Kerry Sainsbury
certainly cannot see an example of it in those links -- am I missing something? Thanks Kerry On Thu, Jun 24, 2010 at 4:08 PM, Brish bris...@gmail.com wrote: On Jun 23, 8:50 pm, Kerry Sainsbury ke...@fidelma.com wrote: I've actually got this mostly implemented, but before I spend any more time

Re: Using the H2 SQL Parser

2010-06-22 Thread Kerry Sainsbury
... and you have to have this system property set: -Dh2.check=false On Tue, Jun 22, 2010 at 4:57 PM, Kerry Sainsbury ke...@fidelma.com wrote: I had a little play, and it looks somewhat promising. Hope this is enough to get you started... Cheers Kerry public class TestSelectHacking

www.h2database.com is down a lot?

2010-06-22 Thread Kerry Sainsbury
Hi Team, I've noticed that www.h2database.com is down a lot at the moment -- is this a know problem? Are other people effected by it? Thanks Kerry -- You received this message because you are subscribed to the Google Groups H2 Database group. To post to this group, send email to

Re: Using the H2 SQL Parser

2010-06-21 Thread Kerry Sainsbury
I had a little play, and it looks somewhat promising. Hope this is enough to get you started... Cheers Kerry public class TestSelectHacking extends TestBase { private void testParser() throws SQLException { JdbcConnection cj = (JdbcConnection) getConnection(play); Session

Re: broken build

2010-06-19 Thread Kerry Sainsbury
I'll use JDK 1.6 from now on. Any chance of a quick summary about how using 1.5 broke the build for you. It's unusual for 1.5 code to break when compiling with 1.6! Cheers Kerry On Sat, Jun 19, 2010 at 7:37 PM, Thomas Mueller thomas.tom.muel...@gmail.com wrote: Hi, I actually told Kerry to

Re: Unrecognized Windows Sockets error: 0: JVM_Bind;

2010-06-17 Thread Kerry Sainsbury
I've got no idea really, but: 1. Can you telnet to the port when your app isn't running? (ie: could there be something else on port 8043?) 2. What happens if you change the port to something else, like 40001? 3. Could it be a Windows 7 security issue? Cheers Kerry On Thu, Jun 17, 2010 at 11:59

Re: DATEDIFF

2010-06-11 Thread Kerry Sainsbury
defined for you ? regards, Dario. El 11/06/10 02:18, Kerry Sainsbury escribió: We're an international group of people headed by a German -- I think you're asking too much! On Fri, Jun 11, 2010 at 3:00 PM, Rami Ojares rami.oja...@gmail.comwrote: Grammatically correct english would be nice

Re: DATEDIFF

2010-06-10 Thread Kerry Sainsbury
Hi Dario, Could you clearly define what it is that you think is wrong? What are you expecting? That said, I think there's a problem with your SQL -- your second and third SELECT statements use current_date rather than @curday, which I suspect is what you really want to use :-) Cheers Kerry On

Re: Views that depends on other view

2010-06-09 Thread Kerry Sainsbury
Hi Folks, I've done some investigation and learned that, given this test case: create table test(a int, b int, c int) insert into test(a, b, c) values (1, 2, 3) create view v1 as select a as b, b as a from test create view v2 as select * from v1 drop view v1 Postgres and HSQLDB

Re: console considerably faster than code

2010-06-08 Thread Kerry Sainsbury
Are you using exactly the same JDBC connection URL? On Wed, Jun 9, 2010 at 6:43 AM, William Osmond william.osm...@gmail.comwrote: Hello Thomas+all, I'm experience a rather strange performance problem that I'm hoping you can provide some insight into. I have a query which takes many times

Re: Catalog and database file name

2010-05-26 Thread Kerry Sainsbury
I bet it works on Windows :-) (that's not a suggestion to use Windows btw!) On Thu, May 27, 2010 at 9:23 AM, Rami Ojares rami.oja...@gmail.com wrote: Hi, If I create a database with url jdbc:h2:tcp://localhost/fOo a file named fOo.h2.db is created Inside the database that db is

Re: Trigger remove()

2010-05-26 Thread Kerry Sainsbury
What do you mean by removing a trigger. From my reading of the documentation http://www.h2database.com/html/features.html#triggersyour trigger should be handed a connection object, so why do you need to create your own? Cheers Kerry On Thu, May 27, 2010 at 10:38 AM, Rami Ojares

Re: TCP localhost Connection Issue.

2010-05-25 Thread Kerry Sainsbury
I'm not sure what your exact problem is, http://www.h2database.com/html/features.html#in_memory_databases says the correct syntax for an in-memory database that is accessible via tcp-ip is something like: jdbc:h2:tcp://localhost:9092/mem:tcpTest;... not

Re: JdbcConnectionPool, setMaxConnections() and getConnection()

2010-05-24 Thread Kerry Sainsbury
I'd think that 15 seconds would be fine. If a connection is taking 15 seconds then surely something is seriously wrong? Certainly 5 mins is too large. On Mon, May 24, 2010 at 8:06 PM, Thomas Mueller thomas.tom.muel...@gmail.com wrote: Hi, Maybe the default timeout (5 minutes) is too large.

Re: JdbcConnectionPool, setMaxConnections() and getConnection()

2010-05-24 Thread Kerry Sainsbury
... and I guess if the timeout is configurable, it doesn't matter too much what the default is :-) On Tue, May 25, 2010 at 10:36 AM, Wildam Martin mwil...@gmail.com wrote: On Mon, May 24, 2010 at 10:06, Thomas Mueller thomas.tom.muel...@gmail.com wrote: 15 seconds:

Re: How do I query using a date range in H2

2010-05-18 Thread Kerry Sainsbury
What's the datatype for the db_inserted column? Show us the table schema for qas_issue Cheers Kerry On Wed, May 19, 2010 at 7:24 AM, gaboshua rsiky...@gmail.com wrote: Sorry for the late response. Hear is the entire error message: select count(distinct pdf_name) from qas_issue where

Re: ROWNUM behavior

2010-05-13 Thread Kerry Sainsbury
Yes, that's the correct behaviour. If your query returns 1 row it will have a rownum of 1. rownums are not persistent -- they relate to the results your query has just returned. They are NOT an internal identifier, like rowids are in Informix databases (for example) Cheers Kerry On Fri, May 14,

  1   2   >