search-path

How to view current schema search path in a h2 database?

我只是一个虾纸丫 提交于 2019-12-11 08:23:15
问题 When connecting to an h2 database, the default search path is set to public . You can alter it with the SET SCHEMA_SEARCH_PATH . But if you alter it multiple times, at some point how can you view its current content? I wasn't able to find some kind of commands like this VIEW SCHEMA_SEARCH_PATH or SHOW SCHEMA_SEARCH_PATH . Typing them give me error messages. 回答1: It's a bit a hack, but you could use: SELECT * FROM INFORMATION_SCHEMA.SESSION_STATE WHERE KEY='SCHEMA_SEARCH_PATH' 回答2: Non-hack

SQL state: 42883, No function matches the given name and argument types. But that function actually exists

二次信任 提交于 2019-12-10 17:46:41
问题 I have a server with PostgreSQL 8.1.23, with a function that works perfectly when it runs with postgres user, but with another user shows the SQL STATE: SQL state: 42883 This is my function: CREATE OR REPLACE FUNCTION fun_validatepost(integer, integer) RETURNS integer AS $BODY$ ... $BODY$ LANGUAGE plpgsql VOLATILE; ALTER FUNCTION fun_validatepost(integer, integer) OWNER TO postgres; GRANT EXECUTE ON FUNCTION fun_validatepost(integer, integer) TO public; GRANT EXECUTE ON FUNCTION fun

Attaching a temporary namespace to the search path

倖福魔咒の 提交于 2019-12-09 03:38:57
问题 This question is sort of a follow up to this post as I'm still not fully convinced that, with respect to code robustness, it wouldn't be far better to make typing namespace::foo() habit instead of just typing foo() and praying you get the desired result ;-) Actual question I'm aware that this goes heavily against "standard R conventions", but let's just say I'm curious ;-) Is it possible to attach a temporary namespace to the search path somehow? Motivation At a point where my package mypkg

Are we able to generate a list of loaded packages in R?

筅森魡賤 提交于 2019-12-04 17:04:28
Is there a function where we can generate a list of required packages in R? Something similar to "pip freeze" so we can duplicate environments quickly? Thanks for not being vague. Since you mentioned duplicating environments, here's some info about availability and namespaces of those available packages. In addition to those functions mentioned by @smci, .Packages will list all packages available in the library location path lib.loc . And find.package will show you the path to the package. Bear in mind that find.packages can present issues when determining availability of a package. require is

When / how are default value expression functions bound with regard to search_path?

拥有回忆 提交于 2019-12-02 07:48:00
问题 For testing purposes, I provide my own implementation of the now() function which is public.now() . Using search_path to override the default pg_catalog.now() with my own version mostly works, but I have a table with a table with a default expression of now() . Showing the table produces something akin to the following: start_date | date | not null default now() However, after a schema save and restore (to a testing DB), the same show table produces start_date | date | not null default pg

Attaching a temporary namespace to the search path

谁说胖子不能爱 提交于 2019-12-02 00:03:59
This question is sort of a follow up to this post as I'm still not fully convinced that, with respect to code robustness, it wouldn't be far better to make typing namespace::foo() habit instead of just typing foo() and praying you get the desired result ;-) Actual question I'm aware that this goes heavily against "standard R conventions", but let's just say I'm curious ;-) Is it possible to attach a temporary namespace to the search path somehow? Motivation At a point where my package mypkg is still in " devel stage " (i.e. not a true R package yet ): I'd like to source my functions into an

How to set default schema in Yii2

Deadly 提交于 2019-12-01 03:06:22
My Yii2 is setup with PostgreSQL. Instead of using separate database per project, I like to use schema for each project. Problem with later setup is that I can't figure out how to select default schema "defaultSchema" through configuration. I am having a problem with migrations table because it defaults to "public" schema when I run migration command. Default "public" schema also prevents using database user's search_path. Although I set up my db user with "search_path=myschema, public" I still cannot use migrations without additional configuration, because during runtime Yii looks for the

How to unmask a function in R, due to name collisions on searchpath

江枫思渺然 提交于 2019-11-30 13:08:56
When I loaded package debug to debug a script with zoo objects, I got trouble: function index from zoo got masked by debug package. How can I unmask index ? In general, how to deal with these name colliding problems? We just do not use debug package with `zoo'? Exported symbols are always identifiable with the :: operator: zoo::index Hidden functions not declared in the namespace can still be accessed using ::: (triple-colon), and example would be zoo:::.onLoad which you can see even though it is not exported. You can unload the package which has masked functions and then reload it. It will

How to use % operator from the extension pg_trgm?

笑着哭i 提交于 2019-11-30 09:23:45
问题 I have my pg_trgm module installed. pg_trgm | 1.0 | extensions | text similarity measurement and index ... The schema set is extensions . To use it I have to run something like this select: extensions.similarity('hello','hallo'); I'm trying to run a statement using the % operator and got the following message. mydb=# select * from rssdata where description % 'Brazil'; ERROR: operator does not exist: character varying % unknown LINE 1: select * from rssdata where description % 'Brazil'; ^ HINT

how can a Win32 App plugin load its DLL in its own directory

风格不统一 提交于 2019-11-30 09:17:26
问题 My code is a plugin for a specific Application, written in C++ using Visual Studio 8. It uses two DLL from an external provider. Unfortunately, my plugin fails to start because the DLLs are not found (I put them in the same directory as the plugin itself). When I manually move or copy the DLLs to the host application directory, then the plugin loads fine. This moving was deemed unacceptably cumbersome for the end user, and I am looking for a way for my plugin to load its DLLs transparently.