| From: | sivakumar krishnamurthy <sivakumar(dot)mailinglist(at)gmail(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | sub query reference error or user error |
| Date: | 2012-11-06 17:36:28 |
| Message-ID: | CANP9x9YGxHepjFf=f0TMGjk5+OdBkDrwNCWz0p-EM4wCxMxt=w@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Hi All,
For the below test case shouldn't the update statement throw error
because the sub query projects a column which is not existing in the table.
For ex in inner select nos1 column exists in t1 and not t2.
Is this a bug or an OP error?
template1=# SELECT version();
version
----------------------------------------------------------------------------------------------------------------
PostgreSQL 9.1.6 on x86_64-unknown-linux-gnu, compiled by gcc-4.4.real
(Ubuntu 4.4.3-4ubuntu5.1) 4.4.3, 64-bit
(1 row)
template1=# \d t1
Table "public.t1"
Column | Type | Modifiers
--------+---------+-----------
nos1 | integer |
template1=# \d t2
Table "public.t2"
Column | Type | Modifiers
--------+---------+-----------
nos2 | integer |
template1=# UPDATE t1 set nos1=2 where nos1 in (select nos1 from t2);
UPDATE 0
template1=#
Thanks,
Sivakumar.K
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tianyin Xu | 2012-11-06 17:45:17 | Re: Question about "ident_file" in postgres.conf |
| Previous Message | Ian Harding | 2012-11-06 16:58:20 | Re: Hot Standby Not So Hot Anymore |