Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 90AE4475D39 for ; Mon, 21 Oct 2002 23:03:49 -0400 (EDT) Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (Postfix) with ESMTP id DD8F9474E53 for ; Mon, 21 Oct 2002 23:03:48 -0400 (EDT) Received: from [66.219.92.2] (HELO chocolate-mousse) by davinci.ethosmedia.com (CommuniGate Pro SMTP 3.5.9) with ESMTP id 1794614; Mon, 21 Oct 2002 20:05:03 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: vernonw@gatewaytech.com, pgsql-sql@postgresql.org Subject: Re: Fwd: Re: Can I search for an array in csf? Date: Mon, 21 Oct 2002 20:02:52 -0700 X-Mailer: KMail [version 1.4] References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200210212002.52843.josh@agliodbs.com> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/268 X-Sequence-Number: 9985 Vernon, > >> One field of a table stores an array of characters in a string fromat = as > >> "a,b,c,d". Is anyway to apply a select statement without using stored > >> procedure? > The reason I use this format for an array is that the array is dynamic. I= =20 have quite few cases of this type of situation. The=20 > maximize length in some cases is known, is unknown in others. I have lear= nt=20 the comment separated format is one way=20 > to solve the problem. Someone also suggested to store the array as an=20 object. I am not sure whether it works or not.=20 > The application is written in Java, by the way. You should store this data in a sub-table linked through a foriegn key.=20= =20 Period. Messing with arrays will only lead you to heartache ... Try the book "Database Design For Mere Mortals" for a primer on SQL DB desi= gn. --=20 -Josh Berkus Aglio Database Solutions San Francisco