On Sat, 2012-09-22 at 20:00 -0700, Chris Travers wrote:
> On Sat, Sep 22, 2012 at 12:23 AM, Jasen Betts
> wrote:
> On 2012-09-18, Rafal Pietrak wrote:
[-]
> > could be written by user as (3):
> > SELECT 1/x AS inverse FROM data WHERE x <> 0 AND
>
On Sat, Sep 22, 2012 at 12:23 AM, Jasen Betts wrote:
> On 2012-09-18, Rafal Pietrak wrote:
> >
> > Actual Tom's example(1):
> > SELECT 1/x AS inverse FROM data WHERE x <> 0;
> > extended to (2):
> > SELECT 1/x AS inverse FROM data WHERE x <> 0 AND 1/x > 20;
> > could be written by us
On 2012-09-18, Rafal Pietrak wrote:
>
> Actual Tom's example(1):
> SELECT 1/x AS inverse FROM data WHERE x <> 0;
> extended to (2):
> SELECT 1/x AS inverse FROM data WHERE x <> 0 AND 1/x > 20;
> could be written by user as (3):
> SELECT 1/x AS inverse FROM data WHERE x <> 0 AND i
>
> On Wed, Sep 19, 2012 at 11:15 PM, David Johnston
> wrote:
> > I could maybe see something like the following having some value:
> >
> > SELECT inverse
> > FROM data
> > WHERE x<>0 AND inverse > .5
> > MACRO inverse (1/x)
> >
>
> WITH macros AS (SELECT *,1/x AS inverse FROM data) SELECT inver
On Wed, Sep 19, 2012 at 11:15 PM, David Johnston wrote:
> I could maybe see something like the following having some value:
>
> SELECT inverse
> FROM data
> WHERE x<>0 AND inverse > .5
> MACRO inverse (1/x)
>
WITH macros AS (SELECT *,1/x AS inverse FROM data) SELECT inverse FROM
macros WHERE x<>0
> -Original Message-
> From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-
> ow...@postgresql.org] On Behalf Of Steve Haresnape
> Sent: Wednesday, September 19, 2012 2:37 AM
> To: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] RFE: Column aliases in WHE
On Wed, 2012-09-19 at 20:36 +0800, Craig Ringer wrote:
> On 09/19/2012 02:36 PM, Steve Haresnape wrote:
>
> > Since some dialects support the idiom and others don't there can't be
> > any compelling reason to withhold support. It's really a matter of style.
> > For my money the DRY style is better
On 09/19/2012 02:36 PM, Steve Haresnape wrote:
Since some dialects support the idiom and others don't there can't be
any compelling reason to withhold support. It's really a matter of style.
For my money the DRY style is better.
So you're saying that you want the implementation to effectively
Hi There,
I've snipped a piece for the daily digest because I take issue with what's
asserted here as a reason for not allowing aliases in where clauses.
<< snipThis isn't just academic nit-picking either, because the SELECT
expressions might not be valid for rows that don't pass WHERE etc.
On Tue, Sep 18, 2012 at 4:44 PM, Craig Ringer wrote:
> On 09/18/2012 07:32 AM, Tom Lane wrote:
>>
>> It's easier to understand why this is if you realize that SQL has a very
>> clear model of a "pipeline" of query execution.
>
> I just wish they hadn't written it backwards!
>
> It'd be much less c
On Mon, 2012-09-17 at 16:44 -0700, Mike Christensen wrote:
> On Mon, Sep 17, 2012 at 4:32 PM, Tom Lane wrote:
> > Mike Christensen writes:
[---]
> > It's easier to understand why this is if you realize that SQL has a very
> > clear model of a "pipeline" of query execution. Conceptually
On 09/18/2012 07:32 AM, Tom Lane wrote:
It's easier to understand why this is if you realize that SQL has a very
clear model of a "pipeline" of query execution.
I just wish they hadn't written it backwards!
It'd be much less confusing were it formulated as something like:
SELECT
FROM thetable
On Mon, Sep 17, 2012 at 4:32 PM, Tom Lane wrote:
> Mike Christensen writes:
>> This definitely makes sense in the context of aggregation, but I'm
>> wondering if the same argument applies in the use case originally
>> posted:
>
>> SELECT left(value, 1) as first_letter
>> FROM some_table
>> WHERE
Mike Christensen writes:
> This definitely makes sense in the context of aggregation, but I'm
> wondering if the same argument applies in the use case originally
> posted:
> SELECT left(value, 1) as first_letter
> FROM some_table
> WHERE first_letter > 'a';
> Obviously, you can write this as:
>
On Mon, Sep 17, 2012 at 3:10 PM, Daniel Serodio (lists)
wrote:
> Ryan Kelly wrote:
>
> On Mon, Sep 17, 2012 at 06:18:53PM -0300, Daniel Serodio (lists) wrote:
>
> It would be nice if PostgreSQL supported column aliases in WHERE
> clauses, eg:
>
> SELECT left(value, 1) AS first_letter
> FROM some_t
Ryan Kelly wrote:
On Mon, Sep 17, 2012 at 06:18:53PM -0300, Daniel Serodio (lists) wrote:
It would be nice if PostgreSQL supported column aliases in WHERE
clauses, eg:
SELECT left(value, 1) AS first_letter
FROM some_table
WHERE first_letter> 'a';
Is this the proper mailing list for such featu
On Sep 17, 2012, at 17:42, Ryan Kelly wrote:
> On Mon, Sep 17, 2012 at 06:18:53PM -0300, Daniel Serodio (lists) wrote:
>> It would be nice if PostgreSQL supported column aliases in WHERE
>> clauses, eg:
>>
>> SELECT left(value, 1) AS first_letter
>> FROM some_table
>> WHERE first_letter > 'a';
>
On Mon, Sep 17, 2012 at 06:18:53PM -0300, Daniel Serodio (lists) wrote:
> It would be nice if PostgreSQL supported column aliases in WHERE
> clauses, eg:
>
> SELECT left(value, 1) AS first_letter
> FROM some_table
> WHERE first_letter > 'a';
>
> Is this the proper mailing list for such feature re
It would be nice if PostgreSQL supported column aliases in WHERE
clauses, eg:
SELECT left(value, 1) AS first_letter
FROM some_table
WHERE first_letter > 'a';
Is this the proper mailing list for such feature requests?
Thanks in advance,
Daniel Serodio
--
Sent via pgsql-general mailing list (p
19 matches
Mail list logo