Re: [GENERAL] type "xxxxxxx" does not exist - Mailing list pgsql-general

From Micky Hulse
Subject Re: [GENERAL] type "xxxxxxx" does not exist
Date
Msg-id CAKzdcNn1WmAZsVsdyimrnm6VZZ_wZUU4YRqQhDDXH5hxW3=1tQ@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] type "xxxxxxx" does not exist  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
On Fri, May 19, 2017 at 1:31 PM, David G. Johnston
<david.g.johnston@gmail.com> wrote:
> Short answer here is that whomever is calling that function needs to ensure
> that their search_path is setup so that the type can be found somewhere in
> it.  Your desire for obscurity means you are pretty much on the hook for
> figuring out the right command to do so.

This is great information! I was not aware of the search_path.
Learning lots of new things here, so thank you David, and all, for the
help! I greatly appreciate it! :)

> See https://www.postgresql.org/docs/current/static/config-setting.html for
> help on various ways to go about making the actual change.

Will do, thanks!

>> I hope this is the right list for me to ask questions about psql.
>> Please let me know if I am in the wrong place. :)
> Right place

Cool! I much prefer listservs over something like StackOverflow as the
conversations tend to be more valuable to me (as has been proven in
this thread already). I'm happy to see that this list is active. :)

>> When listing the functions, I see that functionName() does exist in
>> the database.
> As the error is coming from within the function it indeed must exist and be
> visible to you.

Hehe, that's a good point! :D

>> The type also exists (I think):
> Existence and visability are two different things.  It indeed exists.  It is
> apparently not visible to the user when at the time the function is invoked
> - and the function doesn't explicitly say where to find it.

That makes so much sense now that you, and others, have pointed it
out. Thank you for kicking me in right direction!

>> Note that the role that owns the 'type' is not the same user that is
>> calling the "functionName()" from the psql prompt.
> Doesn't matter.  Types in PostgreSQL are not restricted since they never
> themselves contain any data.  As long as you can find a custom type you can
> use it.
>> ALTER TYPE xxx_xxx_xxxxx OWNER TO otherusername;
> All objects have owners.

Excellent information! Thank you so much for your help David! It's
greatly appreciated!!!!

Have a nice day!


pgsql-general by date:

Previous
From: Micky Hulse
Date:
Subject: Re: [GENERAL] type "xxxxxxx" does not exist
Next
From: Micky Hulse
Date:
Subject: Re: [GENERAL] type "xxxxxxx" does not exist