pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Aspire Something <aspire420@hotpop.com>
To: pgsql Sql <pgsql-sql@postgresql.org>
Subject: Re: Arrays Or Loop
Date: Thu, 6 Mar 2003 09:17:05 -0800
Message-ID: <200303060917.05298.josh@agliodbs.com> (raw)
In-Reply-To: <001101c2e3a5$d507c380$c9c832c0@societykotla>
References: <001101c2e3a5$d507c380$c9c832c0@societykotla>

Aspire,

>  2. Can we use array for the above thing as
>      a. Make an array of the valid roll_numbers. such as
>  ('IDX'=>'ROLL_NUMBER'........)
>      b. Now select the array element by the index which will produce the
>  roll_number and work on it.
>      c. Array could be build by for loop
>  3. Will the array approch execute code fast. if yes can you please give me
>  some refrences so that i can actually
>              build one such function.

Unfortunately, the current version of PL/pgSQL have problems with array 
support.  So if you want to test this with arrays, you will have to use 
another language, such as C or Python.

>  4. Lastly if i use views will they help in fas execution

No.   If you want fast execution, try writing the procedure in C.

-- 
Josh Berkus
Aglio Database Solutions
San Francisco



view thread (2+ messages)

Message-ID: <200303060917.05298.josh@agliodbs.com>
Permalink:  ../200303060917.05298.josh@agliodbs.com/
Also on:    postgresql.org/message-id/200303060917.05298.josh@agliodbs.com

 · 

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: josh@agliodbs.com, aspire420@hotpop.com
  Subject: Re: Arrays Or Loop
  In-Reply-To: <200303060917.05298.josh@agliodbs.com>

* 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