| From: | Richard Huxton <dev(at)archonet(dot)com> |
|---|---|
| To: | "FERREIRA William (COFRAMI)" <william(dot)ferreira(at)airbus(dot)com> |
| Cc: | "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: rows and array |
| Date: | 2005-02-22 13:00:11 |
| Message-ID: | 421B2CDB.90103@archonet.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
FERREIRA William (COFRAMI) wrote:
> i want do to it in a stored procedure using the pl/pgSQL language.
> i can't use "ORDER by" because the traitment is very specific.
>
> for example, in oracle syntaxe i can create my own type :
> type recordChild is TABLE OF XDB_CHILD%ROWTYPE
> and next when i declare my variable with this type :
> children recordChild;
> i can store rows and re-order them like this :
> children(i-j) := children(i-j-1);
Well, I'd look at one of three solutions:
1. Functional index to order by
2. Temporary table (read up on EXECUTE and OID caching)
3. pl/perl/python (which are better suited to this sort of thing)
Probably worth looking into functional indexes - might be what you need.
--
Richard Huxton
Archonet Ltd
| From | Date | Subject | |
|---|---|---|---|
| Next Message | James Croft | 2005-02-22 13:29:45 | tsearch2 problems / limitations |
| Previous Message | FERREIRA William (COFRAMI) | 2005-02-22 12:45:19 | Re: rows and array |