|
|
Sponsor |
7.2 behavior -- inserts, rules and jdbc: msg#00280db.postgresql.jdbc
first, the context: redhat 7.3, postgres 7.2.5, appropriate pgjdbc2.jar i recently added a rule associated with a table insert. the rule calls a stored pl/pgsql procedure to update another table in the database. i couldn't find a way for the procedure to be called unless it returned a value, so i declared it as returning int and return 1 every time. the rule is as follows: CREATE RULE OnPayment AS ON INSERT TO payment DO SELECT ApplyPayment ( new.customer_id, new.against_credit_balance, new.payment_type, new.amount, new.operator_id ); so everything works now, _but_: if i use executeUpdate to issue my insert, i get an SQL exception because a result is returned from ApplyPayment(). i ended up using executeQuery and ignoring the result set instead. is this really the correct behavior, or have i missed something obvious? thanks, richard -- Richard Welty rwelty@xxxxxxxxxxxxxxx Averill Park Networking 518-573-7592 Unix, Linux, IP Network Engineering, Security ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your message can get through to the mailing list cleanly
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: 7.3.1 UTF-8 bug(?) and 7.2.x Charset compatibility, Achilleus Mantzios |
|---|---|
| Next by Date: | where to put postgresql.jar in Mac OS X, Tony Grant |
| Previous by Thread: | BYTEA dump compatibility, Pier Paolo Bortone |
| Next by Thread: | where to put postgresql.jar in Mac OS X, Tony Grant |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home | sitemap
| advertise | OSDir is
an inevitable website.
|