On Wed, Oct 5, 2011 at 5:39 PM, Tom Lane wrote:
> Lauri Kajan writes:
>> This works with other values but not with nulls:
>
>> CREATE VIEW view1 AS
>> SELECT
>> attribute1 as a1,
>> text null as a2,
>> text 'test' as a3
>> FROM
>
I know that I should define a data type for a field a2. But how?
This works with other values but not with nulls:
CREATE VIEW view1 AS
SELECT
attribute1 as a1,
text null as a2,
text 'test' as a3
FROM
table;
Thanks
-Lauri Kajan
--
Sent via pgsql-general mailing list (pgsql-g
011, at 14:29, Merlin Moncure wrote:
>
>> On Tue, Aug 16, 2011 at 8:33 AM, Harald Fuchs wrote:
>>> In article
>>> ,
>>> Lauri Kajan writes:
>>>
>>>> I have also tried:
>>>> select
>>>> *, getAttributes(a.id)
>>&
6, 2011 at 12:17 PM, Chetan Suttraway
wrote:
>
>
> On Tue, Aug 16, 2011 at 1:11 PM, Lauri Kajan wrote:
>>
>> Hi all,
>>
>> I have made a function returning a custom record type that contains two
>> fields.
>> Now I want to select from that function. Ac
Hi all,
I have made a function returning a custom record type that contains two fields.
Now I want to select from that function. Actually I want to make a
join with a table.
Let me explain.
Here is my function:
CREATE TYPE attributes AS (class integer, type integer);
CREATE OR REPLACE FUNCTION g