Update problem. - Mailing list pgsql-sql

From Shavonne Marietta Wijesinghe
Subject Update problem.
Date
Msg-id 008201c77530$0d877690$1102a8c0@dream
Whole thread Raw
List pgsql-sql
Hello
 
I have a table created as the following
 
CREATE TABLE mod48_00_2007
(
  id text,
  n_gen serial NOT NULL,
  formstore text,
  te_cognome text,
  te_paternita text,
  te_nome text,
  te_sesso text,
  te_dtnasc text,
  te_attnasc text,
  te_luonasc text,
  te_provstato text,
  te_indi text,
  te_prov text,
  te_richiesta text,
  atto_forma text,
  rev_test text,
  atto_dt text,
  atto_num text,
  dt_olog text,
  cod_notaio text,
  pa_cognome text,
  pa_nome text,
  pa_qual text,
  pa_indirizzo text,
  pa_civ text,
  pa_cap text,
  pa_pro text,
  pa_sede text,
  pa_estero text,
  pa_data text,
  f_olo text,
  f_pub text,
  f_rev text,
  f_seg text,
  f_spe text,
  atto_riferimento text,
  ratto_dt text,
  ratto_num text,
  rdt_olog text,
  r_cognome text,
  r_nome text,
  r_qual text,
  r_sede text,
  r_estero text,
  dt_oggi text,
  n_pub_aut text,
  dt_tr_rgt text,
  sche_singola text,
  sche_multipla text,
  n_fog text,
  tot_n_fog text,
  reg_anno text,
  username text,
  date_inserted text,
  time_inserted text,
  deleted text,
  date_deleted text,
  time_deleted text,
  f_tes text,
  CONSTRAINT mod48_00_2007_pkey PRIMARY KEY (n_gen)
)
 
At a surtain point i need to replace a record with another
 
For example i have inserted 4 records. (1, 2 ,  3 , 4) I need to replace all the values from the record 4 to the record 2 but keeping the n_gen serial key. And then delete the record 4. So that the next record i insert will take the n_gen 4
 
How can i do this?
 
Shavonne Wijesinghe
www.studioform.it
 
Le informazioni contenute nella presente comunicazione e i relativi allegati possono essere riservate e sono, comunque destinate esclusivamente alle persone o alla Società sopra indicati.
La diffusione, distribuzione e/o copiature del documento trasmesso da parte di qualsiasi soggetto diverso dal destinatario è proibita, sia ai sensi dell’art. 616 c.p., che ai sensi del D. Lgs. n. 196/2003.
 
Se avete ricevuto questo messaggio per errore, Vi preghiamo di distruggerlo e di informarci immediatamente per telefono allo 0039362595044 o inviando un messaggio all’indirizzo e-mail
amministrazione@studioform.it
 
The informations in this communication is confidential and may also be legally privileged. It is intended for the addressee only.
Access to this e-mail by anyone else is unauthorized. It is not to be relied upon by any person other than the addressee, except with our prior written approval. If you received this message please send an e-mail to the sender.

pgsql-sql by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: Calling void functions
Next
From: "Shavonne Marietta Wijesinghe"
Date:
Subject: Update problem.