pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jasen Betts <jasen@xnet.co.nz>
To: pgsql-sql@postgresql.org
Subject: Re: interesting sequence
Date: 6 Jul 2011 12:28:13 GMT
Message-ID: <iv1kct$vb$1@reversiblemaps.ath.cx> (raw)
References: <201107050652.22187.johnf@jfcomputer.com>
	<CAEV0TzAPfE1_hGEm3sK5Z4o8TS+H6w698DoZmWRRKEoBQo1F8w@mail.gmail.com>
	<CADwm0aiqCmx59b22XVWbw4yk8SB2LJfTG=ihtX=yeE=0uiFfXw@mail.gmail.com>
	<201107051442.29875.johnf@jfcomputer.com>
	<CAEV0TzBqODFzhiAR4iZPF+SCdvpEhjJYNWwZ+Da_Bdombvtsgw@mail.gmail.com>
	<CADwm0aga=6kgSi6KnYTntM91hQ-H95Ag4jiQhwe=mX_jqPab0w@mail.gmail.com>

On 2011-07-06, Kevin Crain <kevin.crain1@gmail.com> wrote:
> That's why you need to do this inside a function.  Basically just make
> an insert function for the table and have it calculate the count and
> do the insert in one transaction.

you will still get duplicates, so include code in the function to
retry if there is an error.

-- 
⚂⚃ 100% natural




view thread (10+ messages)  latest in thread

Message-ID: <iv1kct$vb$1@reversiblemaps.ath.cx>
Permalink:  ../iv1kct$vb$1@reversiblemaps.ath.cx/
Also on:    postgresql.org/message-id/iv1kct$vb$1@reversiblemaps.ath.cx

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jasen@xnet.co.nz
  Subject: Re: interesting sequence
  In-Reply-To: <iv1kct$vb$1@reversiblemaps.ath.cx>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox