Re: accessing fully qualified fields in records in PLPGSQL?

Поиск
Список
Период
Сортировка
От Jan Wieck
Тема Re: accessing fully qualified fields in records in PLPGSQL?
Дата
Msg-id 200203252120.g2PLK5o25548@saturn.janwieck.net
обсуждение исходный текст
Ответ на accessing fully qualified fields in records in PLPGSQL?  ("Oberpriller, Wade D." <oberpwd@nsc-msg01.network.com>)
Список pgsql-general
Oberpriller, Wade D. wrote:
> How does one access a field in a record from a query like so:
>
> FOR REC IN SELECT myTable.oid FROM myTable, yourTable WHERE (myTable.id =
> yourTable.id) LOOP
>    VAL := REC.oid;
>    VAL := REC.myTable.oid;
> END LOOP;
>
> I get errors in PLPGSQL compilation for both the assignment statements
> above. What is the correct way to get the myTable oid in the REC record?

    REC  beeing  of type record and VAL beeing of type oid in the
    declare section,  I  don't  get  any  error  on  the  REC.oid
    attempt.  What  version  of PostgreSQL are you using (this is
    v7.2).


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


В списке pgsql-general по дате отправления:

Предыдущее
От: "Johnson, Shaunn"
Дата:
Сообщение: Re: file size issue?
Следующее
От:
Дата:
Сообщение: Re: rule problem