Hi,
Thanks for the reply.
I have write the transaction, but I have some doubt's... If in this example
the Update is executed successfully and the Function it is not, what
happens? The Update automatically rolls back?
Example:
[code]
Begin;
update aae_anuncios
set
n_anunciante = 'teste',
email = '[email protected]',
telefone_privado = '123456789',
dat_nasc = '1980-01-01',
n_anuncio = 'teste nome',
telefone_anuncio = '234567890',
id_genero = 'femi',
id_cidade = '1452003',
id_nacionalidade = 'BRAS',
id_orientacao = 'h'
where id_anuncio_externo = '38';
select apr_update_hist_2_1('aae_hist_anuncios',
'id_anuncio_externo',
'38', /* id_anuncio_externo */
'2010-08-31', /* data_inicio */
'2010-12-29', /* data_fim */
'AA' /* Motivo: Aprovação Anúncio */
);
commit;
[/code]
Best Regards,
On Sun, Nov 7, 2010 at 3:41 PM, Scott Ribe <[email protected]>wrote:
> On Nov 7, 2010, at 8:37 AM, Andre Lopes wrote:
>
> > The only way I can guarantee a transaction is in a Function or there are
> other ways?
>
> <http://www.postgresql.org/docs/9.0/interactive/tutorial-transactions.html
> >
>
> --
> Scott Ribe
> [email protected]
> http://www.elevated-dev.com/
> (303) 722-0567 voice
>
>
>
>
>
> --
> Sent via pgsql-general mailing list ([email protected])
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>