| From: | "Greg Sabino Mullane" <greg(at)turnstep(dot)com> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org |
| Cc: | pgsql-patches(at)postgresql(dot)org |
| Subject: | Re: [HACKERS] Continue transactions after errors in psql |
| Date: | 2005-04-27 12:02:21 |
| Message-ID: | 8a3f483153bb6f01e5d2fe0594abf374@biglumber.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers pgsql-patches |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> I'm finding it hard to visualize a non-interactive script making
> any good use of such a setting. Without a way to test whether
> you got an error or not, it would amount to an "ignore errors
> within transactions" mode, which seems a pretty bad idea.
>
> Can you show a plausible use-case for such a thing?
I could have used this yesterday. I was populating a test table with
a primary key on two columns and needed to add a bunch of random rows.
I generated a 10_000 line file of one insert statement each. Rather than
worrying about collisions, I could simply \rollbackonerror (or whatever
we're calling it today :) and silently discard the handful that happen
to violate the primary key constraint and let the rest insert.
- --
Greg Sabino Mullane greg(at)turnstep(dot)com
PGP Key: 0x14964AC8 200504270754
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----
iD8DBQFCb33NvJuQZxSWSsgRAvdfAJwMqysSpVI2BDh9wENT2jxMZnspagCfRlHJ
9ElhNydsz2FsCc1JgI5R+gU=
=h9AW
-----END PGP SIGNATURE-----
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Treat | 2005-04-27 12:32:40 | Re: [HACKERS] Continue transactions after errors in psql |
| Previous Message | Simon Riggs | 2005-04-27 07:45:10 | Re: [HACKERS] Bad n_distinct estimation; hacks suggested? |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Treat | 2005-04-27 12:32:40 | Re: [HACKERS] Continue transactions after errors in psql |
| Previous Message | Tom Lane | 2005-04-27 03:15:21 | Re: Cleaning up unreferenced table files |