Gregory Stark ha scritto:
"Nico Sabbi" <[EMAIL PROTECTED]> writes:
nb1=# select r.a from (select row(tab1.*)::tab1 as r from tab1)x;
ERROR: missing FROM-clause entry for table "r"
LINE 1: select r.a from (select row(tab1.*)::tab1 as r from tab1)x;
^
I tried many variations (in
"Nico Sabbi" <[EMAIL PROTECTED]> writes:
> nb1=# select r.a from (select row(tab1.*)::tab1 as r from tab1)x;
> ERROR: missing FROM-clause entry for table "r"
> LINE 1: select r.a from (select row(tab1.*)::tab1 as r from tab1)x;
> ^
> I tried many variations (including casting x as t
Tom Lane ha scritto:
Nico Sabbi <[EMAIL PROTECTED]> writes:
is there any way to cast a generic row to an array or to a table type?
"row(...)::composite_type" should work in 8.2 and up.
regards, tom lane
---(end of broadcast)
Nico Sabbi <[EMAIL PROTECTED]> writes:
> is there any way to cast a generic row to an array or to a table type?
"row(...)::composite_type" should work in 8.2 and up.
regards, tom lane
---(end of broadcast)---
TIP 3: Have you
Hi,
is there any way to cast a generic row to an array or to a table type?
The example is trivial, but it explains what I'm trying to do:
nb1=# select * from tab1;
a | t
---+---
1 | a
2 | b
3 | c
(3 rows)
nb1=# select r from (select row(tab1.*) as r from tab1)x;
r
---
(1,a)
(2,b)
(3,c)
(