Re: value

From: Gissur Þórhallsson <gissur(at)loftmyndir(dot)is>
To: pgsql-general(at)postgresql(dot)org
Cc: dean(dot)a(dot)rasheed(at)gmail(dot)com
Subject: Re: value
Date: 2010-09-16 16:10:11
Message-ID: AANLkTi=_ZrtTnzPpdet5eDr7Jeq=d=zxxHjyOPbeXRkB@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
> which is probably not what you might expect.
>
No, indeed it is not.

My solution - which seems to be working - is replacing:
new.my_table_id
with:
currval(pg_get_serial_sequence('my_table', 'my_table_id'))
in the on_insert rule

This does the trick.

Thanks,
Gissur Þórhallsson

Loftmyndir ehf.
Laugavegur 13
IS 101 Reykjavík - Iceland
sími (tel): (+354) 540 2500
tölvupóstur (email): gissur(at)loftmyndir(dot)is

In response to

  • Re: value at 2010-09-16 14:08:10 from Dean Rasheed

Responses

  • Re: value at 2010-09-16 17:04:29 from Dean Rasheed

Browse pgsql-general by date

  From Date Subject
Next Message Christine Penner 2010-09-16 16:23:55 query join issue
Previous Message Peter Hopfgartner 2010-09-16 16:07:13 Re: Getting FATAL: terminating connection due to administrator command