Hi, > In the first place, you are evidently running as superuser, which means > that has_foo_privilege will ALWAYS say 't'
Ok, seems reasonable ;) > (except possibly if the > target object doesn't exist, in which case I think you get an error). Yep, one does. > In the second place, trying to access another session's temp table is > unsupported. I understand, it's more the opposite, I was fixing a bug in a plpgsql function that would fail when the user has created a certain (temporary) table in a second session, because the code only checked the existence of the table_name without taking into account the proper schema. > After you've created at least one temp table, you can look at the result > of "current_schemas(true)". There's no guarantee that the schema even > exists before you've created something... Got that, looks like an acceptable workaround in this case, though. Is there a guaranteed order of the resulting array, i.e. is this guaranteed to return the temp schema, given there is one: 'select (current_schemas(true))[1]'.....? (obviously, regexp's will also do the trick, I'm just asking) -- Best, Frank. ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match