Search Postgresql Archives

return multiple rows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,
I have a FUNCTION queried like this:
  SELECT * FROM f_authorize_check_query2('%{SQL-User-Name}','%{User-Password}' [...];

Built this way:
  CREATE FUNCTION f_authorize_check_query2(...)  RETURNS radcheck
    AS $_$
   DECLARE
       [...]
       v_ret radcheck%ROWTYPE;
       [...]
          SELECT  INTO v_ret '111',username,'Cleartext-Password',pwd,':=' FROM [...]
   RETURN v_ret;
   END;
  $_$
  LANGUAGE plpgsql;

It returns only one row, like this:
    +----+----------+--------------------+----+-------+
    | id | UserName | Attribute          | op | Value |
    +----+----------+--------------------+----+-------+
    | 1  | bartek   | Cleartext-Password | := | 1234  |
    +----+----------+--------------------+----+-------+

I would like it to return
    +----+----------+--------------------+----+-------+
    | id | UserName | Attribute          | op | Value |
    +----+----------+--------------------+----+-------+
    | 1  | bartek   | Cleartext-Password | := | 1234  |
    | 3  | bartek   | Simultaneous-Use   | := | 1     |
    +----+----------+--------------------+----+-------+

*But*, I would like to _hardcode_ the "Simultaneous-Use" row.
If I use a FUNCTION to build the "Cleartext-Password" row, it's because the data structure
could not have been feetched simply.

Is SELECTing INTO a second time OK?

--
      Architecte Informatique chez Blueline/Gulfsat:
   Administration Systeme, Recherche & Developpement
                                   +261 34 29 155 34

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux