PostgreSQL: subquery must return one column
<p>Looking obvious error, still see no chance to find it. I've made to localize error in this function:</p>

<pre><code>CREATE OR REPLACE FUNCTION findRecipientsByQuestion(questionId BIGINT)
RETURNS SETOF BIGINT AS $$
DECLARE
  question questionObject;  

  BEGIN
    question := (
      SELECT "a"."id", "a"."body", "a"."author_id", "a"."category_id", "a"."urgent", "a"."created_at", "a"."locale_id", "a"."lat", "a"."lng", "a"."radius" 
      FROM "question" "a" 
      WHERE "a"."id"=questionId 
      LIMIT 1
    );


    RETURN QUERY SELECT "a"."id" 
    FROM "user" "a" INNER JOIN "notifications" "b" ON ("a"."id"="b"."user_id")
    WHERE ("b"."category_id"=question.category_id OR "b"."urgent") AND 
        isGeoMatch("a"."lat", "a"."lng", "a"."radius", question.lat, question.lng, question.radius);
  END 
  $$LANGUAGE plpgsql;
</code></pre>

<p>Which uses this type:</p>

<pre><code>CREATE TYPE questionObject AS (
  id BIGINT,
  body VARCHAR,
  author_id BIGINT,
  category_id BIGINT,
  urgent BOOLEAN,
  created_at TIMESTAMP,
  locale_id BIGINT,
  lat DOUBLE PRECISION,
  lng DOUBLE PRECISION,
  radius INTEGER
);
</code></pre>

<p>And I'm getting this error in runtime:</p>

<pre><code>Error: subquery must return only one column
</code></pre>