[SQL] ERROR: plan should not reference subplan's variable

2006-05-02 Thread Catalin Pitis
Hi *
 
I'm trying to run the following SQL statement on a PostgreSQL 8.1, installed on a Windows machine:
 
INSERT INTO PROJECT(PROJECT_ID,PROJECT_DESC) (SELECT MAX(PROJECT_ID),'MYPROJECT'FROM PROJECT WHERE NOT EXISTS  (  SELECT PROJECT_DESC FROM PROJECT WHERE PROJECT_DESC = 'MYPROJECT' ))
 
and I get the following error: 
 
ERROR:  plan should not reference subplan's variable
 
If, for example, I replace MAX with some other aggregation (e.g. AVG or SUM), everything works ok.
 
The table DDL looks like:
 
CREATE TABLE project(  project_id int4 NOT NULL,  project_desc varchar(255),  CONSTRAINT project_pkey PRIMARY KEY (project_id)) WITH OIDS; 
 
Do you have any clue why does this happen?
 
Thanks,
Catalin


Re: [SQL] ERROR: plan should not reference subplan's variable

2006-05-02 Thread Catalin Pitis
Hi Tom
 
Could you tell me when will 8.1.4 be released with the problem solved?
 
Thanks,
Catalin 
On 5/3/06, Tom Lane <[EMAIL PROTECTED]> wrote:
"Catalin Pitis" <[EMAIL PROTECTED]> writes:
> ERROR:  plan should not reference subplan's variableI've applied a patch for this; will be in 8.1.4.http://archives.postgresql.org/pgsql-committers/2006-05/msg00016.php
   regards, tom lane


[SQL] Connecting to Postgres from other machines (outside localhost)

2006-05-04 Thread Catalin Pitis
Hello
 
I installed PostgreSQL 8.0 on Windows and I can connect from localhost only. How can I configure the server to allow connection from other machines?
 
Thank you
Catalin


Re: [SQL] Connecting to Postgres from other machines (outside localhost)

2006-05-04 Thread Catalin Pitis
After I've changed the pg_hba.conf, I got the following error when connecting (from log file)
 
2006-05-04 21:57:26 LOG:  invalid entry in file "C:/Program Files/PostgreSQL/8.0/data/pg_hba.conf" at line 68, token "192.168.0.1/192"2006-05-04 21:57:26 FATAL:  missing or erroneous pg_hba.conf file
2006-05-04 21:57:26 HINT:  See server log for details. 
The pg_hba.conf file is attached...
 
Catalin 
On 5/4/06, Catalin Pitis <[EMAIL PROTECTED]> wrote:


I did all you said:
 
I set pg_hba.conf:
 

# IPv4 local connections:host    all all 127.0.0.1/32
  md5
host    all all 192.168.197.1/192  md5 host    all all 
192.168.123.1/192  md5host    all all 
192.168.0.1/192  md5 
 
I set postgres.conf:
 
listen_addresses = '*' # what IP interface(s) to listen on; # defaults to localhost, '*' = anyport = 5433max_connections = 100 
I'm using jdbc with the following URL:
 
jdbc:postgresql://192.168.197.1:5433/postgres8
 
Where postgres8 is the name of the database.
 
I still can't connect...
 
Can you give me a hint?
 
Thanks 

Catalin 

On 5/4/06, Oisin Glynn <[EMAIL PROTECTED]> wrote:
 
Catalin Pitis wrote:> Hello>> I installed PostgreSQL 8.0 on Windows and I can connect from localhost 
> only. How can I configure the server to allow connection from other> machines?>> Thank you> CatalinUnderStart-> Programs->PostgreSQLXX->Configuration filespostgresql.conf
 pg_hba.confAre the 2 files I modified.  Please be aware my settings are for a devbox and are WIDE OPEN AS SHOWN HERE this might allow alot more peopleconnect than you want.postgresql.conf# - Connection Settings - 
listen_addresses = '*'# what IP address(es) to listen on;   # comma-separated list of addresses;   # defaults to 'localhost', '*' = allport = 5432max_connections = 100 
pg_hba.conf# TYPE  DATABASEUSERCIDR-ADDRESS  METHOD# IPv4 local connections:hostall all 
127.0.0.1/32  md5hostall all 192.168.10.1/24  md5# IPv6 local connections:
#hostall all ::1/128   md5


pg_hba.conf
Description: Binary data

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [SQL] Connecting to Postgres from other machines (outside localhost)

2006-05-04 Thread Catalin Pitis
Ok, I found it, it was my mistake.
 
An IP entry should be have /32 or /128. I used different values. Now I got it (RTFM).
 
Regards,
Catalin 
On 5/4/06, Oisin Glynn <[EMAIL PROTECTED]> wrote:
Catalin Pitis wrote:> I did all you said:>> I set pg_hba.conf:>> # IPv4 local connections:
> hostall all 127.0.0.1/32> <http://127.0.0.1/32>  md5> hostall all 
192.168.197.1/192> <http://192.168.197.1/192>  md5> hostall all 192.168.123.1/192> <
http://192.168.123.1/192>  md5> hostall all 192.168.0.1/192> <http://192.168.0.1/192
>  md5>>> I set postgres.conf:>> listen_addresses = '*' # what IP interface(s) to listen on;> # defaults to localhost, '*' = any> port = 5433> max_connections = 100
>> I'm using jdbc with the following URL:>> jdbc:postgresql://192.168.197.1:5433/postgres8>> Where postgres8 is the name of the database.>> I still can't connect...
>> Can you give me a hint?>> Thanks> Catalin>>> On 5/4/06, *Oisin Glynn* <[EMAIL PROTECTED]> 
[EMAIL PROTECTED]>> wrote:>> Catalin Pitis wrote:> > Hello> >> > I installed PostgreSQL 8.0 on Windows and I can connect from> localhost
> > only. How can I configure the server to allow connection from other> > machines?> >> > Thank you> > Catalin> Under> Start-> Programs->PostgreSQLXX->Configuration files
> postgresql.conf> pg_hba.conf>> Are the 2 files I modified.  Please be aware my settings are for a dev> box and are WIDE OPEN AS SHOWN HERE this might allow alot more people
> connect than you want.>> postgresql.conf> # - Connection Settings ->> listen_addresses = '*'# what IP address(es) to listen on;># comma-separated list of addresses;
># defaults to 'localhost', '*' = all> port = 5432> max_connections = 100>> pg_hba.conf> # TYPE  DATABASEUSERCIDR-ADDRESS  METHOD
>> # IPv4 local connections:> hostall all 127.0.0.1/32> <http://127.0.0.1/32>  md5
> hostall all 192.168.10.1/24> <http://192.168.10.1/24>  md5> # IPv6 local connections:
> #hostall all ::1/128   md5>>Did you stop and start Postgres Service?