Zitat von Siva Palanisamy :
Hi Alban,
Thanks for the reply.
1) I'm using PostgreSQL 8.1; So, I can't use RETURNING clause!
You should Upgrade ASAP! 8.1 is 'out of lifetime'.
Regards, Andreas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your sub
.com]
Sent: Thursday, November 17, 2011 1:20 PM
To: Siva Palanisamy
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] How to lock and unlock table in postgresql
On 17 Nov 2011, at 7:10, Siva Palanisamy wrote:
> If there is a better solution, kindly let me know.
>
> CREATE OR R
On 17 Nov 2011, at 7:10, Siva Palanisamy wrote:
> If there is a better solution, kindly let me know.
>
> CREATE OR REPLACE FUNCTION Fun()
> RETURNS VOID AS '
> DECLARE
> Id INTEGER;
> BEGIN
> INSERT INTO table1 VALUES (DEFAULT, ''Sample'', DEFAULT);
> SELECT MAX(id) I
On 11/16/11 11:16 PM, Siva Palanisamy wrote:
Thanks for the solution. If I use currval('sqlname') in a loop of 7
records, what will happen if a record is inserted manually? I guess it will
alter the sequences, and wrong values/chain might be introduced in foreign
tables in the below functi
rify me on this?
Thanks and Regards,
Siva.
-Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of John R Pierce
Sent: Thursday, November 17, 2011 12:05 PM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] How to lock and un
On 11/16/11 10:23 PM, John R Pierce wrote:
use nextval('seqname')
sorry, I meant, currval('seqname') ps.
--
john r pierceN 37, W 122
santa cruz ca mid-left coast
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
On 11/16/11 10:10 PM, Siva Palanisamy wrote:
If there is a better solution, kindly let me know.
use nextval('seqname') ... full transactional integrity without any
blocking or locking.
--
john r pierceN 37, W 122
santa cruz ca mid-left