pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jaime Casanova <systemguards@yahoo.com>
To: sql pgsql <pgsql-sql@postgresql.org>
Subject: select with a function
Date: Fri, 26 Nov 2004 00:41:58 -0600 (CST)
Message-ID: <20041126064158.67362.qmail@web50010.mail.yahoo.com> (raw)

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



Message-ID: <20041126064158.67362.qmail@web50010.mail.yahoo.com>
Permalink:  ../20041126064158.67362.qmail@web50010.mail.yahoo.com/
Also on:    postgresql.org/message-id/20041126064158.67362.qmail@web50010.mail.yahoo.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: systemguards@yahoo.com
  Subject: Re: select with a function
  In-Reply-To: <20041126064158.67362.qmail@web50010.mail.yahoo.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