Re: Equivalent syntax of PL/SQL using array in PL/pgSQL

From: David Johnston <polobo(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Equivalent syntax of PL/SQL using array in PL/pgSQL
Date: 2013-11-14 15:43:06
Message-ID: 1384443786782-5778364.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

bocap wrote
>>> (rec[1]).t1 := 1;

You need to stay one-level higher and re-build the entire typ entry then
assign it back to the array at the same position.

rec[1] = (1, rec[1].t2)::typ;

David J.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Equivalent-syntax-of-PL-SQL-using-array-in-PL-pgSQL-tp5778355p5778364.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dang Minh Huong 2013-11-14 15:56:08 Re: Equivalent syntax of PL/SQL using array in PL/pgSQL
Previous Message Elliot 2013-11-14 15:38:35 Re: Equivalent syntax of PL/SQL using array in PL/pgSQL