From: | "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | "Clemens Schwaighofer" <cs(at)tequila(dot)co(dot)jp> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Query problem |
Date: | 2007-10-12 14:22:32 |
Message-ID: | 162867790710120722w3a4abc14s1bde65f18577eedc@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
2007/10/12, Clemens Schwaighofer <cs(at)tequila(dot)co(dot)jp>:
> hi,
>
> thats the first time I am a bit confused by a query not working.
>
> I have this table:
>
> gullevek=# \d test
> Table "public.test"
> Column | Type | Modifiers
> ---------+-------------------+--------------------------------------------------------
> test_id | integer | not null default
> nextval('test_test_id_seq'::regclass)
> email_a | character varying |
> email_b | character varying |
> Indexes:
> "test_pkey" PRIMARY KEY, btree (test_id)
>
> with this content:
>
> gullevek=# select * from test;
> test_id | email_a | email_b
> ---------+---------------+-------------
> 2 | test(at)test(dot)com | bar(at)foo(dot)com
> 1 | foo(at)bar(dot)com |
> (2 rows)
>
> if I do this select:
>
> select * from (select test_id, email_a FROM test WHERE email_a =
> 'moo(at)boo(dot)com') as s, (select test_id, email_b from test where email_b =
> 'bar(at)foo(dot)com') as t;
>
you get 0 rows. moo(at)boo(dot)com isn't anywhere and bar(at)foo(dot)com cannot do
pair with any. else 0 * 1 = 0
Pavel
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2007-10-12 14:38:45 | Re: different date-time in base and in system |
Previous Message | Richard Huxton | 2007-10-12 14:16:30 | Re: Out of memory with ODBC |