select with a function

From: Jaime Casanova <systemguards(at)yahoo(dot)com>
To: sql pgsql <pgsql-sql(at)postgresql(dot)org>
Subject: select with a function
Date: 2004-11-26 06:41:58
Message-ID: 20041126064158.67362.qmail@web50010.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi all,
i need some help

i wanna do a select with a function call like this:

SELECT academico.aca_f_siguientecurso(
academico.aca_t_alumnocurso.ent_codigo,
academico.aca_t_alumnocurso.sec_codigo,
academico.aca_t_alumnocurso.ani_codigo,
academico.aca_t_alumnocurso.cic_codigo,
academico.aca_t_alumnocurso.esp_codigo,
academico.aca_t_alumnocurso.cur_codigo,
academico.aca_t_alumnocurso.cur_paralelo,
academico.aca_t_alumnocurso.est_codigo),
NULL as asp_codigo,
academico.aca_t_alumnocurso.alu_codigo
FROM academico.aca_t_alumnocurso
WHERE academico.aca_t_alumnocurso.est_codigo IN
('AP', 'RP', 'RT');

the function academico.aca_f_siguientecurso returns a
custom type (a record).

ok, in the IRC AndrewSN told me this won't work in a
pre 8 pgsql, so i will need do it in a subselect but
the function has to be called once per row in
academico.aca_t_alumnocurso that matches the where.

<AndrewSN> but I don't know any easy way of doing that
for each row in a query.

any ideas?

regards,
Jaime Casanova

_________________________________________________________
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Eisentraut 2004-11-26 07:30:41 Re: HowTo change encoding type....
Previous Message Andrew Thorley 2004-11-25 21:47:20 Type Inheritance