X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 1A5609FA5E9 for ; Wed, 31 May 2006 17:56:21 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 75543-05 for ; Wed, 31 May 2006 17:56:16 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mir3-fs.mir3.com (mail.mir3.com [65.208.188.100]) by postgresql.org (Postfix) with ESMTP id 181099FA5E1 for ; Wed, 31 May 2006 17:56:15 -0300 (ADT) Received: mir3-fs.mir3.com 172.16.1.11 from 172.16.2.68 172.16.2.68 via HTTP with MS-WebStorage 6.0.6249 Received: from archimedes.mirlogic.com by mir3-fs.mir3.com; 31 May 2006 13:56:13 -0700 Subject: Re: Fields From: Mark Lewis To: Guy Rouillier Cc: pgsql-jdbc@postgresql.org In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: MIR3, Inc. Date: Wed, 31 May 2006 13:56:13 -0700 Message-Id: <1149108973.20798.3.camel@archimedes> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-27) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/150 X-Sequence-Number: 15278 On Wed, 2006-05-31 at 15:51 -0500, Guy Rouillier wrote: > Charles Curi wrote: > > Hi people!!! > > I have a table called "orders" with fields "a","b" and "c". > > I want to make a INSERT only of fields "a" and "b" by Java and at > > this moment c=a*b; Is it possible? > > I think you are saying you want your Java code to insert fields "a" and > "b" and have "c" automatically set to a value derived from "a" and "b". > If so, you can accomplish this with an insert trigger. > Or you could just insert a, b and a*b yourself . . . . or am I missing something here? -- Mark