Skip site navigation (1) Skip section navigation (2)

accessing composite value's field in function

From: "Nikita Koselev" <koselev(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: accessing composite value's field in function
Date: 2008-10-05 06:59:20
Message-ID: 24e54d80810042359j729f9623q41d8925d9ebf8fae@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
I try to print out field of composite value in my procedure
--

CREATE OR REPLACE FUNCTION add_position(rs requirement_vo )
  RETURNS void AS
$BODY$
    DECLARE
    BEGIN
	RAISE NOTICE rs.name;
  END;
$BODY$
--
However "rs.name" causes "ERROR: syntax error at or near "rs.name"".
So how should I access composite value's field inside of the function?

-- 
Nikita Koselev

Responses

pgsql-novice by date

Next:From: Richard BroersmaDate: 2008-10-05 14:58:33
Subject: Re: accessing composite value's field in function
Previous:From: Nikita KoselevDate: 2008-10-05 06:54:10
Subject: DESCRIBE for composite type?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group