Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Mot clé REPLACE



Merci pour vos réponses.
 
J'ai une autre question, lorsque je fais un select avec "FOR UPDATE" est t'il possible de détecter qu'un enregistrement à déjà été selectionner par ce type de requête sans attendre le timeout ?
 
Merci de votre aide.
 
Vincent Lemaire.

On Mon, 17 Dec 2007 08:40:44 +0100
"Stéphane A. Schildknecht" wrote:
> Guillaume Lelarge a écrit :
>> Lemaire Vincent wrote:
>>
>>> J’aimerais savoir si en postgreSQL il existe comme dans
>>>MySQL un mot clé
>>> permettant de créer ou modifier un élément.
>>>
>>> Sur MySQL c’est le mot clé REPLACE qui est utilisé comme
>>>un INSERT, mais
>>> dans postgreSQL cela ne fonctionne pas.
>>>
>>> Existe-t-il un élément du même genre ?
>>>
>>>
>>
>> Non, ça n'existe pas.
>>
>>
>>
>
> Une solution « simple » consiste à créer un déclencheur
>sur l'insertion
> ou la mise à jour qui teste l'existence avant
>insertion/MAJ.
>
> SAS
>
> --
> Stéphane SCHILDKNECHT
> Président de PostgreSQLFr
> Tél. 09 53 69 97 12
> http://www.postgresqlfr.org
>
>
> ---------------------------(end of
>broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an
>appropriate
> subscribe-nomail command to
>majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list
>cleanly



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group