> Because I specifically aliased the first task reference using AS task_1.
>
>
Ok, totally. I missed that when I first read your query, didn't read it
closely enough. Thanks.
> You're confused about the input vs. the output. The output columns
> of a view all have to have distinct names, just like you can't do
> "create table foo (f1 int, f1 int)". They can be reading the same
> values, though.
>
> regards, tom lane
>
Ok, that makes sense. Tha
> You're confused about the input vs. the output. The output columns
> of a view all have to have distinct names, just like you can't do
> "create table foo (f1 int, f1 int)". They can be reading the same
> values, though.
>
> regards, tom lane
>
Ok, that makes sense. Tha
Ryan Murphy writes:
> Interesting, thanks! Do you know why the first one fails instead of doing
> that renaming process, while your version succeeds?
You're confused about the input vs. the output. The output columns
of a view all have to have distinct names, just like you can't do
"create tabl
On 09/05/2016 01:13 PM, Ryan Murphy wrote:
Interesting, thanks! Do you know why the first one fails instead of
doing that renaming process, while your version succeeds?
Because I specifically aliased the first task reference using AS task_1.
On Monday, September 5, 2016, Adrian Klaver mailt
Interesting, thanks! Do you know why the first one fails instead of doing
that renaming process, while your version succeeds?
On Monday, September 5, 2016, Adrian Klaver
wrote:
> On 09/05/2016 12:55 PM, Ryan Murphy wrote:
>
>> Hello, I have a question about views in Postgres.
>>
>> Given a tabl
On 09/05/2016 12:55 PM, Ryan Murphy wrote:
Hello, I have a question about views in Postgres.
Given a table like so:
create table todo (
id serial,
task text,
done_time timestamp default null
);
it is legal (though perhaps not advised, by some) to query it like so:
select task, * from to
Hello, I have a question about views in Postgres.
Given a table like so:
create table todo (
id serial,
task text,
done_time timestamp default null
);
it is legal (though perhaps not advised, by some) to query it like so:
select task, * from todo;
This gives a result with 2 redundant "ta