Complex column ref. - Mailing list pgsql-sql

From Arve Fahlvik
Subject Complex column ref.
Date
Msg-id 3C518801.208@vivatech.no
Whole thread Raw
List pgsql-sql
Hello

I wonder if it is possible to refer to different columns in a query 
without usin 'execute'.

If I have the following table:
create table test(
a int,
b int,
c int);

declare
r record;
i numeric;
begin
.
select ref into i from reftable where ...;
select * into r from test where oid=...;
if r[i] = 2002 then  do something;
end if;
.
end;

In other words: I'm looking for a dynamic way of refer to columns 
without using 'execute'.

I hope the explanation of what I want to do is understandable.

Thanks

afa




pgsql-sql by date:

Previous
From: "Josh Berkus"
Date:
Subject: Re: linking from SQL Server
Next
From: Bruce Momjian
Date:
Subject: Re: LIMIT Optimization