Received: from mail.interchange.ca (ns.interchange.ca [216.126.79.2]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f0B3IiB84780 for ; Wed, 10 Jan 2001 22:18:44 -0500 (EST) (envelope-from michael@fastmail.ca) Received: by mail.interchange.ca (Fastmailer, from userid 555) id 3CA422205; Wed, 10 Jan 2001 22:18:41 -0500 (EST) MIME-Version: 1.0 Message-Id: <3A5D2611.00001D.86746@frodo.searchcanada.ca> To: pgsql-sql@postgresql.org Subject: Table locking. From: "Michael Richards" X-Fastmail-IP: 24.156.176.65 Date: Wed, 10 Jan 2001 22:18:41 -0500 (EST) Content-Transfer-Encoding: 7bit Content-Type: Text/Plain X-Archive-Number: 200101/101 X-Sequence-Number: 762 Hi. I've always had trouble understanding how to properly deal with the following case. I need to run an insert on a table but I don't want any other transactions to commit the insert before me. Within the logic of the program, I run a select to see if there is a value there, then the insert. Between these 2 statements someone could commit one that causes the insert to fail. Is there a better way to do this than locking the table in SHARE ROW EXCLUSIVE MODE and trying to be certain that anything else that may call an insert there asks for the same type of lock? -Michael _________________________________________________________________ http://fastmail.ca/ - Fast Free Web Email for Canadians From pgsql-sql-owner@postgresql.org Wed Jan 10 23:59:39 2001 Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f0B4bBB90828 for ; Wed, 10 Jan 2001 23:37:11 -0500 (EST) (envelope-from pgsql-sql-owner@postgresql.org) Received: from paprika.michvhf.com (adsl-dynamic35-204.detroit.mi.ameritech.net [64.108.244.204] (may be forged)) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f09FLEB22185 for ; Tue, 9 Jan 2001 10:21:14 -0500 (EST) (envelope-from vev@michvhf.com) Received: (qmail 17781 invoked by uid 1001); 9 Jan 2001 15:21:10 -0000 Date: Tue, 9 Jan 2001 10:21:10 -0500 (EST) From: Vince Vielhaber To: The Hermit Hacker cc: Kaare Rasmussen , , Subject: Re: [HACKERS] Re: PostgreSQL web page In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200101/102 X-Sequence-Number: 763 On Tue, 9 Jan 2001, The Hermit Hacker wrote: > On Tue, 9 Jan 2001, Kaare Rasmussen wrote: > > > I wonder why http://www.postgresql.org is not updated with news. The > > latest "Latest News" is from Nov 16. I have to go to > > http://www.pgsql.com to find some interesting news later than that: > > 2000-12-22 PostgreSQL, Inc. Releases Open Source Replication & Database > > and 2000-12-12 2000 Linux Journal Editor's > > Choice Award for Best Database > > > > In fact I was looking for the Replication server. No mention seems to be > > available on postgresql.org. > > > > Also the mailing list archive for pgsql-sql is not listed here: > > http://www.postgresql.org/devel-corner/index.html - but you can see it > > if you write the correct URL yourself. > > I have no graphical browser right now, and lynx isn't installed, so I'm a > bit at a disadvantage here ... but, pgsql-sql *should* be listed under > users-gallery, not devel ... devel is -hackers, -bugs, -ports, etc ... Unless the clock on hub was wrong, I have the award happening on 11/16/Y2K. The replication server info was a press release by PostgreSQL, Inc. Not the PostgreSQL Global Development Group. Between GB and PG,Inc with the constant barrage of press releases I made the decision months ago that NO press releases from ANY group would be posted on the PostgreSQL website - these groups have their own websites for that and PostgreSQL.org doesn't need to be caught up in the middle. pgsql-sql is in the users section - both info and archives. > Beyond that, the web site is maintained by Vince ... but I thought the > Award was definitely up there already ... Both on the main page and in latest news. Vince. -- ========================================================================== Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net 128K ISDN from $22.00/mo - 56K Dialup from $16.00/mo at Pop4 Networking Online Campground Directory http://www.camping-usa.com Online Giftshop Superstore http://www.cloudninegifts.com ==========================================================================