Re: Missing FROM clause

From: Richard Huxton <dev(at)archonet(dot)com>
To: Ulrich Wisser <ulrich(dot)wisser(at)relevanttraffic(dot)se>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Missing FROM clause
Date: 2004-08-25 08:30:54
Message-ID: 412C4E3E.3020102@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ulrich Wisser wrote:
> Hi,
>
> after seeing some mysterious messages about missing from clauses I did
> turn on query logging. Unfortunately am I now more confused then before.
>
>
> Aug 25 09:22:38 balder postgres[25538]: [277-1] LOG: query: SELECT *
> FROM LOGIN
> Aug 25 09:22:38 balder postgres[25538]: [277-2] where USERNAME='ulrich'
> Aug 25 09:22:47 balder postgres[25590]: [277] NOTICE: Adding missing
> FROM-clause entry for table "partner"
>
> Please find the definition of my login table below.
>
> Why would pg add the partner table to the query?

The only things I can think are:
1. You have a view named "login" which is earlier in your search path.
2. The query is not terminated in some way and you have two queries
being merged.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gaetano Mendola 2004-08-25 09:15:03 Re: Problem to connect to the Windows Port
Previous Message Silvio Matthes 2004-08-25 08:23:20 Re: select ... where <column>='' does a seqscan [auf