From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <> Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id A3C55BB88 for ; Tue, 19 Jul 2005 16:19:41 +0200 (CEST) Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j6JD8OFX022656 for ; Tue, 19 Jul 2005 15:08:24 +0200 Received: from server4.messagingengine.com (server4.internal [10.202.2.135]) by frontend1.messagingengine.com (Postfix) with ESMTP id AD5E8CC16D5 for ; Tue, 19 Jul 2005 09:08:23 -0400 (EDT) Received: by server4.messagingengine.com (Postfix, from userid 505) id 1EED2360C7B; Tue, 19 Jul 2005 09:08:24 -0400 (EDT) Message-ID: Date: Tue, 19 Jul 2005 09:08:24 -0400 X-Sieve: CMU Sieve 2.3 From: Mail Sieve Subsystem To: MIME-Version: 1.0 Content-Type: multipart/report; report-type=disposition-notification; boundary="13167/server4.messagingengine.com" Subject: Automatically rejected mail Auto-Submitted: auto-replied (rejected) X-Miltered: at nez-perce with ID 42DCFB48.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; baretta:01 subset:01 ocaml:01 abstraction:01 inference:01 compiler:01 compilation:01 ocaml:01 caml-list:01 caml-list:01 beginner's:01 beginners:01 bug:01 ...:98 informix:98 X-Attachments: cset="utf-8" type="message/disposition-notification" X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.3 This is a MIME-encapsulated message --13167/server4.messagingengine.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Your message was automatically rejected by Sieve, a mail filtering language. The following reason was given: Message bounced by server content filter --13167/server4.messagingengine.com Content-Type: message/disposition-notification Reporting-UA: server4.messagingengine.com; Cyrus v2.3-alpha/CMU Sieve 2.3 Final-Recipient: rfc822; gregory_guyomarch Original-Message-ID: Disposition: automatic-action/MDN-sent-automatically; deleted --13167/server4.messagingengine.com Content-Type: message/rfc822 Received: from server4.messagingengine.com (server4.internal [10.202.2.135]) by server4.messagingengine.com (Cyrus v2.3-alpha) with LMTPA; Tue, 19 Jul 2005 09:08:24 -0400 X-Sieve: CMU Sieve 2.3 X-Spam-score: 0.0 Received: from services.msn.com [64.4.60.7] by imap-mail.com with POP3 for gregory_guyomarch@imap-mail.com; Tue, 19 Jul 2005 09:08:20 -0400 X-LinkName: Hotmail account X-Message-Status: n X-SID-PRA: caml-list-admin@yquem.inria.fr X-SID-Result: TempError X-Message-Info: UZmYcfFpTCe9OsOg4+N+zmKa7/RMVyjux/UKe/RMyVo= Received: from concorde.inria.fr ([192.93.2.39]) by mc1-f25.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); Tue, 19 Jul 2005 05:49:07 -0700 Received: from yquem.inria.fr (yquem.inria.fr [128.93.8.37]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j6JCmpw7012280; Tue, 19 Jul 2005 14:48:53 +0200 Received: from yquem.inria.fr (localhost [127.0.0.1]) by yquem.inria.fr (Postfix) with ESMTP id B0F8BBCB0; Tue, 19 Jul 2005 14:22:01 +0200 (CEST) Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id C5E0EBCAE for ; Tue, 19 Jul 2005 14:12:06 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j6JCC5uU007895 for ; Tue, 19 Jul 2005 14:12:06 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA13739 for ; Tue, 19 Jul 2005 14:12:05 +0200 (MET DST) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j6JCC4oY007892 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Tue, 19 Jul 2005 14:10:07 +0200 Received: from caml.4.jean.claude.bourut by 194.103.215.249 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 19 Jul 2005 14:10:07 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: jean-claude Date: Tue, 19 Jul 2005 11:55:26 +0000 (UTC) Lines: 65 Message-ID: References: <20050718210518.GA10051@furbychan.cocan.org> <42DC9D16.1080607@barettadeit.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: main.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 194.103.215.249 (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.9) Gecko/20050711 Firefox/1.0.5) X-Miltered: at concorde with ID 42DCF6B3.002 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 42DCEE15.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at conX-Spam: no; 0.00; baretta:01 subset:01 ocaml:01 abstraction:01 inference:01 compiler:01 compilation:01 ocaml:01 ...:98 informix:98 sybase:98 mssql:98 wrote:01 writes:01 compile:01 X-Remote-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Remote-Spam-Status: No, score=1.6 required=5.0 tests=RCVD_BY_IP,RCVD_NUMERIC_HELO autolearn=disabled version=3.0.2 X-Remote-Spam-Level: * Subject: [Caml-list] Re: Idea for another type safe PostgreSQL interface Sender: caml-list-admin@yquem.inria.fr Errors-To: caml-list-admin@yquem.inria.fr X-BeenThere: caml-list@yquem.inria.fr X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Caml users' mailing list List-Unsubscribe: , X-OriginalArrivalTime: 19 Jul 2005 12:49:08.0336 (UTC) FILETIME=[40E3FF00:01C58C60] Alex Baretta barettadeit.com> writes: > > Richard Jones wrote: > > [I just throwing this idea out there to see if people find it > > interesting, or want to shoot it down ... There're only fragments of > > working code at the moment] > > > > I'm thinking about a type safe interface to PostgreSQL. One such > > interface at the moment is in Xcaml, but it only supports a very small > > subset of SQL, and I like to use complex SQL. It seems that there is > > a way to support the whole of PostgreSQL's language from within OCaml > > programs, in a type safe way. > > Every once in a while we extend the Embedded SQL with a new feature, but > we never planned to support all of PostgreSQL. In fact, what we want to > have is abstraction over the actual DB implementation. > > > The general plan would be to have a camlp4 extension which would use > > Postgres's new "PREPARE" feature to actually prepare the statements, > > and Postgres's other new feature, "Describe Statement", to pull out > > the parameter types and result types from the prepared statement. > > This allows the camlp4 extension to replace the statement string with > > a type safe expression, and allow type inference to find mismatches. > > How a typical program would look is shown at the end of this message. > Back in the pre-internet era, Dec implemented a DBMS (Rdb I think), a C++ compiler and a "compile time" coherency check between C++ and Rdb. Their implementation had the following features -1) C++ compilation would read Rdb schema, -2) There was a strong coupling between database schema and C++ program. -3) Moving from test environment to production lead us to rebuild the code, (That’s silly but I could not find a way around it). We just gave up using it. > I really think XDBS is the the way to go. You define the schema in a > high level language (OO-Entity-Relationship modeling), supporting lower > level refinements (logical, physical and virtual schema refinements) and > compiling to Ocaml and SQL-DDL. This way, the type safety can be > established at compile time without need for a database connection. > Also, the type safety does not depend on a specific implementation of > SQL, which is usually desireable. > > Alex > Nb: I have never worked with PostgreSQL, BUT, with Oracle, Informix, DB2, sybase, mssql, the full name of a table ( databasename.login.table ) only binds to an entry inside a system catalog. If your application uses several logins, then, checking program structures against database schema can not really occur before login time. If the goal is only a sanity check, then using any reference definition can help, but I don't think it will replase the run time check. Regards, _______________________________________________ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs --13167/server4.messagingengine.com--