| From: | Petr Jezek <jez20um(at)axpsu(dot)fpf(dot)slu(dot)cz> |
|---|---|
| To: | Edmar Wiggers <edmar(at)brasmap(dot)com> |
| Cc: | pgsql-sql(at)postgresql(dot)org |
| Subject: | RE: INSERT [IGNORE] INTO TABLE |
| Date: | 2000-10-31 17:04:24 |
| Message-ID: | Pine.LNX.4.10.10010311741080.30822-100000@axpsu.fpf.slu.cz |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
On Tue, 31 Oct 2000, Edmar Wiggers wrote:
> > If I try to insert some row which in the table already exist the
> > postgre don't insert it and tell some error. Everything ok.
> > I'll insert only if there is not the same (same key) record,
> > else don't insert and don't tell me errors about it.
> > In MySQL is a switch [IGNORE].
>
> Not a good feature for me. What do you do if the record already exists?
> Update it?
>
> Check existence and then insert or update. If you want, I guess you could
> wrap that inside a stored procedure.
>
Well, that's a good idea :-) but I'm not sure about how to create
such procedure. I would appreciate Your help.
Petr Jezek
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Edmar Wiggers | 2000-10-31 17:19:07 | RE: INSERT [IGNORE] INTO TABLE |
| Previous Message | Edmar Wiggers | 2000-10-31 16:31:29 | RE: INSERT [IGNORE] INTO TABLE |