Re: how do i avoid multiple sessions from inserting the
От | Dennis Gearon |
---|---|
Тема | Re: how do i avoid multiple sessions from inserting the |
Дата | |
Msg-id | FAVR2ZF0JFFC3Y934YIRPVQBAOMQKPL.3e5a6975@cal-lab обсуждение исходный текст |
Ответ на | Re: how do i avoid multiple sessions from inserting the (Kolus Maximiliano <Kolus.maximiliano@bcr.com.ar>) |
Список | pgsql-general |
You might have duplicate john doeos with diffent ID's 2/24/2003 9:51:40 AM, Kolus Maximiliano <Kolus.maximiliano@bcr.com.ar> wrote: > > > From: Kolus Maximiliano <Kolus.maximiliano@bcr.com.ar> > > To: patrick.fiche@aqsacom.com, pgsql-general@postgresql.org > Subject:Re: [GENERAL] how do i avoid multiple sessions from inserting the > Date: Mon, 24 Feb 2003 14:51:40 -0300 > > > > > > Why not something like that ? > > [...] > > 2) IF NULL -> INSERT INTO users values (....'blah' ) WHERE NOT EXISTS > .... > > -> SELECT id FROM users WHERE email = 'blah' > > > I tried, but it's giving me an error, as if INSERT wouldn't like the WHERE: > > > INSERT INTO users (email) VALUES ('john@doe.com') > WHERE NOT EXISTS > (SELECT id FROM users WHERE email='john@doe.com'); > > > ERROR: parser: parse error at or near "WHERE" > > > (Btw, i didnt know that INSERT would accept a WHERE clause) >
В списке pgsql-general по дате отправления: