Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.10.1/8.10.1) with ESMTP id e6OGgjh29916 for ; Mon, 24 Jul 2000 12:42:45 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id MAA00638; Mon, 24 Jul 2000 12:41:34 -0400 (EDT) To: igor cc: pgsql-novice@postgreSQL.org Subject: Re: Alter table with arrays In-reply-to: <15913127324.20000724175410@mailru.com> References: <00072401305903.00253@comptechnews> <23362.964418697@sss.pgh.pa.us> <15913127324.20000724175410@mailru.com> Comments: In-reply-to igor message dated "Mon, 24 Jul 2000 17:54:10 +0400" Date: Mon, 24 Jul 2000 12:41:34 -0400 Message-ID: <635.964456894@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200007/125 igor writes: > Help me please to alter table with arrays . > And now I would like to increase the number of colomns of array from > two to tree. What is the way to fulfill these operation? As of 7.0.*, the only way to change the size of an array is to replace the whole array, ie, UPDATE table SET arraycol = '{ .... }' I have recently fixed the array code so that you can enlarge an array by assigning to an element or slice. For example, given an array with current dimensions [1:3] you can assign to array[4] (or array[0], or array[2:7], etc). Restriction: you can't leave "holes" in the array, so it only works for 1-D arrays. This will appear in 7.1. regards, tom lane