| From: | Tino Wildenhain <tino(at)wildenhain(dot)de> |
|---|---|
| To: | "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: implicit tables syntax disappeared from 8.0->8.1 |
| Date: | 2006-02-28 15:21:08 |
| Message-ID: | 44046A64.9050906@wildenhain.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
A. Kretschmer schrieb:
> am 28.02.2006, um 14:01:44 +0100 mailte pg(at)os10000(dot)net folgendes:
>
>>update t1
>>set t1f1='test'
>>where t1.t1f2=t2.t2f2
>>and t1.t1f3=t2.t2f3;
>>
>>unfortunately, now I get the error that t2 is not in the FROM clause.
>
>
> You can set
>
> add_missing_from
>
> in yout postgresql.conf, but please read
> http://www.postgresql.org/docs/8.1/interactive/runtime-config-compatible.html#RUNTIME-CONFIG-COMPATIBLE-VERSION
Better dont do that but use the FROM clause of update:
http://www.postgresql.org/docs/8.1/static/sql-update.html
e.g.
UPDATE t1
SET t1.f1='test'
FROM t2
WHERE t1.t1f2=t2.t2f2
AND t1.t1f3=t2.t2f3;
(although I bet your example is sloppy and you even want t1, t2 and t3 -
so add t3 to the FROM list as you know with SELECT)
HTH
Tino
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2006-02-28 16:02:48 | Re: Problem with PostgreSQL 8.1.3 on Windows XP Pro |
| Previous Message | Greg Sabino Mullane | 2006-02-28 15:14:39 | Re: majordomo unmaintained, postmaster emails ignored? |