pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vernon Wu <vernonw@gatewaytech.com>
To: pgsql-sql@postgresql.org
Subject: Fwd: Re: Can I search for an array in csf?
Date: Mon, 21 Oct 2002 19:55:39 -0700
Message-ID: <UDA62BAFAQPB8JEHNI629531PJ2WC0.3db4be2b@kimiko> (raw)





Hi, Richard,

Thanks for your response and see below.

10/21/2002 3:13:57 AM, Richard Huxton <dev@archonet.com> wrote:

>On Friday 18 Oct 2002 1:58 pm, Vernon Wu wrote:
>> 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?
>>
>> Thanks for your input.
>
>Not really,  and I can't think any way of accessing an index on this either. 
>Are you sure you wanted the characters stored this way? Even if the overhead 
>of a separate table isn't woth it, you might want to look into arrays and the 
>intarray stuff in contrib/
>

The reason I use this format for an array is that the array is dynamic. I have quite few cases of this type of situation. The 
maximize length in some cases is known, is unknown in others. I have learnt the comment separated format is one way 
to solve the problem. Someone also suggested to store the array as an object. I am not sure whether it works or not. 
The application is written in Java, by the way.

I have taken a look at intarray by searching on the postgres.org web site as well as in google. (I use cypwin and unable 
to find the contrib directory). My impression is it isn't a standard SQL data type. And its element is integer only. 

It is my first time doing DB table design. Any helps will be gracfully appreciated.

Thanks,

Vernon

  

>-- 
>  Richard Huxton
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
>subscribe-nomail command to majordomo@postgresql.org so that your
>message can get through to the mailing list cleanly
>


-------- End of forwarded message --------






view thread (9+ messages)  latest in thread

Message-ID: <UDA62BAFAQPB8JEHNI629531PJ2WC0.3db4be2b@kimiko>
Permalink:  ../UDA62BAFAQPB8JEHNI629531PJ2WC0.3db4be2b@kimiko/
Also on:    postgresql.org/message-id/UDA62BAFAQPB8JEHNI629531PJ2WC0.3db4be2b@kimiko

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: vernonw@gatewaytech.com
  Subject: Re: Fwd: Re: Can I search for an array in csf?
  In-Reply-To: <UDA62BAFAQPB8JEHNI629531PJ2WC0.3db4be2b@kimiko>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox