Re: [GENERAL] Check constraint on foreign table using SQL function

2014-12-26 Thread Adrian Klaver
On 12/26/2014 05:18 AM, Andreas Ulbrich wrote: On 25.12.2014 23:50, Adrian Klaver wrote: On 12/25/2014 11:21 AM, Andreas Ulbrich wrote: Hey. In the first part I connect to testdb (the remote db). Here I create the schema 'andreas'. That the search_path correct is, shows the output of the pgpls

Re: [GENERAL] Check constraint on foreign table using SQL function

2014-12-26 Thread Andreas Ulbrich
On 25.12.2014 23:50, Adrian Klaver wrote: On 12/25/2014 11:21 AM, Andreas Ulbrich wrote: Hey. In the first part I connect to testdb (the remote db). Here I create the schema 'andreas'. That the search_path correct is, shows the output of the pgplsql version. Yeah, that was a false alarm on my

Re: [GENERAL] Check constraint on foreign table using SQL function

2014-12-25 Thread Adrian Klaver
On 12/25/2014 11:21 AM, Andreas Ulbrich wrote: Hey. In the first part I connect to testdb (the remote db). Here I create the schema 'andreas'. That the search_path correct is, shows the output of the pgplsql version. Yeah, that was a false alarm on my part. Forgot about $user in the path. Th

Re: [GENERAL] Check constraint on foreign table using SQL function

2014-12-25 Thread Andreas Ulbrich
Hey. In the first part I connect to testdb (the remote db). Here I create the schema 'andreas'. That the search_path correct is, shows the output of the pgplsql version. Then, in the second part, I'm postgres (this db ist empty since compiling). The usermapping says, I wont to be andreas@test

Re: [GENERAL] Check constraint on foreign table using SQL function

2014-12-25 Thread Adrian Klaver
On 12/25/2014 09:27 AM, Tom Lane wrote: Andreas Ulbrich writes: Questions: Wy is the check constraint function in a select called? The search_path seams not to be set for the SQL function, is this behavior correct? Like Adrian, I'm a bit suspicious whether this test script is creating the obj

Re: [GENERAL] Check constraint on foreign table using SQL function

2014-12-25 Thread Tom Lane
Andreas Ulbrich writes: > Questions: > Wy is the check constraint function in a select called? > The search_path seams not to be set for the SQL function, is this > behavior correct? Like Adrian, I'm a bit suspicious whether this test script is creating the objects in the schema you think it is.

Re: [GENERAL] Check constraint on foreign table using SQL function

2014-12-25 Thread Adrian Klaver
On 12/25/2014 03:31 AM, Andreas Ulbrich wrote: Salvete! I've made the following observation: I have a foreign table (postgres_fdw) to a remote table B. On the remote table is a check constraint using a SQL-function with access to an other table. In the remote DB both tables and the check-functi

[GENERAL] Check constraint on foreign table using SQL function

2014-12-25 Thread Andreas Ulbrich
Salvete! I've made the following observation: I have a foreign table (postgres_fdw) to a remote table B. On the remote table is a check constraint using a SQL-function with access to an other table. In the remote DB both tables and the check-function resist in a seperate schema "andreas". Th