How to fix issue uuid_generate_v1() does not exist in postgresql , actually i have the function under public...












1















org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select * from da.test_get(cast(? as integer),cast(? as text),cast(? as text),cast(? as text),cast(? as text))]; nested exception is org.postgresql.util.PSQLException: ERROR: spiexceptions.UndefinedFunction: function uuid_generate_v1() does not exist
Hint: No function matches the given name and argument types. You might need to add explicit type casts.
Where: Traceback (most recent call last):



enter image description here










share|improve this question














bumped to the homepage by Community 9 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • And what is da.test_get?

    – CL.
    Sep 11 '18 at 9:03











  • da.test_get is a user function i write for our system, it will invoke the function uuid_generate_v1()

    – Jeremy
    Sep 13 '18 at 7:06











  • And what is the source code of da.test_get?

    – CL.
    Sep 13 '18 at 7:33











  • insert into tmp.xxx_list select x.id, x.circuit_id, uuid_generate_v1(), uuid_generate_v1() from circuit_ma x left join tmp.xxx_list y on x.id = y.panel_id and x.circuit_id = y.circuit_id where y.panel_id is null;

    – Jeremy
    Sep 13 '18 at 11:35











  • I did not write the schema name of uuid_generate_v1(), because it is under schema public, and schema public is in the search_path .

    – Jeremy
    Sep 13 '18 at 11:37
















1















org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select * from da.test_get(cast(? as integer),cast(? as text),cast(? as text),cast(? as text),cast(? as text))]; nested exception is org.postgresql.util.PSQLException: ERROR: spiexceptions.UndefinedFunction: function uuid_generate_v1() does not exist
Hint: No function matches the given name and argument types. You might need to add explicit type casts.
Where: Traceback (most recent call last):



enter image description here










share|improve this question














bumped to the homepage by Community 9 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • And what is da.test_get?

    – CL.
    Sep 11 '18 at 9:03











  • da.test_get is a user function i write for our system, it will invoke the function uuid_generate_v1()

    – Jeremy
    Sep 13 '18 at 7:06











  • And what is the source code of da.test_get?

    – CL.
    Sep 13 '18 at 7:33











  • insert into tmp.xxx_list select x.id, x.circuit_id, uuid_generate_v1(), uuid_generate_v1() from circuit_ma x left join tmp.xxx_list y on x.id = y.panel_id and x.circuit_id = y.circuit_id where y.panel_id is null;

    – Jeremy
    Sep 13 '18 at 11:35











  • I did not write the schema name of uuid_generate_v1(), because it is under schema public, and schema public is in the search_path .

    – Jeremy
    Sep 13 '18 at 11:37














1












1








1








org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select * from da.test_get(cast(? as integer),cast(? as text),cast(? as text),cast(? as text),cast(? as text))]; nested exception is org.postgresql.util.PSQLException: ERROR: spiexceptions.UndefinedFunction: function uuid_generate_v1() does not exist
Hint: No function matches the given name and argument types. You might need to add explicit type casts.
Where: Traceback (most recent call last):



enter image description here










share|improve this question














org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select * from da.test_get(cast(? as integer),cast(? as text),cast(? as text),cast(? as text),cast(? as text))]; nested exception is org.postgresql.util.PSQLException: ERROR: spiexceptions.UndefinedFunction: function uuid_generate_v1() does not exist
Hint: No function matches the given name and argument types. You might need to add explicit type casts.
Where: Traceback (most recent call last):



enter image description here







postgresql uuid






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Sep 11 '18 at 3:16









Jeremy Jeremy

292




292





bumped to the homepage by Community 9 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 9 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • And what is da.test_get?

    – CL.
    Sep 11 '18 at 9:03











  • da.test_get is a user function i write for our system, it will invoke the function uuid_generate_v1()

    – Jeremy
    Sep 13 '18 at 7:06











  • And what is the source code of da.test_get?

    – CL.
    Sep 13 '18 at 7:33











  • insert into tmp.xxx_list select x.id, x.circuit_id, uuid_generate_v1(), uuid_generate_v1() from circuit_ma x left join tmp.xxx_list y on x.id = y.panel_id and x.circuit_id = y.circuit_id where y.panel_id is null;

    – Jeremy
    Sep 13 '18 at 11:35











  • I did not write the schema name of uuid_generate_v1(), because it is under schema public, and schema public is in the search_path .

    – Jeremy
    Sep 13 '18 at 11:37



















  • And what is da.test_get?

    – CL.
    Sep 11 '18 at 9:03











  • da.test_get is a user function i write for our system, it will invoke the function uuid_generate_v1()

    – Jeremy
    Sep 13 '18 at 7:06











  • And what is the source code of da.test_get?

    – CL.
    Sep 13 '18 at 7:33











  • insert into tmp.xxx_list select x.id, x.circuit_id, uuid_generate_v1(), uuid_generate_v1() from circuit_ma x left join tmp.xxx_list y on x.id = y.panel_id and x.circuit_id = y.circuit_id where y.panel_id is null;

    – Jeremy
    Sep 13 '18 at 11:35











  • I did not write the schema name of uuid_generate_v1(), because it is under schema public, and schema public is in the search_path .

    – Jeremy
    Sep 13 '18 at 11:37

















And what is da.test_get?

– CL.
Sep 11 '18 at 9:03





And what is da.test_get?

– CL.
Sep 11 '18 at 9:03













da.test_get is a user function i write for our system, it will invoke the function uuid_generate_v1()

– Jeremy
Sep 13 '18 at 7:06





da.test_get is a user function i write for our system, it will invoke the function uuid_generate_v1()

– Jeremy
Sep 13 '18 at 7:06













And what is the source code of da.test_get?

– CL.
Sep 13 '18 at 7:33





And what is the source code of da.test_get?

– CL.
Sep 13 '18 at 7:33













insert into tmp.xxx_list select x.id, x.circuit_id, uuid_generate_v1(), uuid_generate_v1() from circuit_ma x left join tmp.xxx_list y on x.id = y.panel_id and x.circuit_id = y.circuit_id where y.panel_id is null;

– Jeremy
Sep 13 '18 at 11:35





insert into tmp.xxx_list select x.id, x.circuit_id, uuid_generate_v1(), uuid_generate_v1() from circuit_ma x left join tmp.xxx_list y on x.id = y.panel_id and x.circuit_id = y.circuit_id where y.panel_id is null;

– Jeremy
Sep 13 '18 at 11:35













I did not write the schema name of uuid_generate_v1(), because it is under schema public, and schema public is in the search_path .

– Jeremy
Sep 13 '18 at 11:37





I did not write the schema name of uuid_generate_v1(), because it is under schema public, and schema public is in the search_path .

– Jeremy
Sep 13 '18 at 11:37










1 Answer
1






active

oldest

votes


















0














Apparently, the CREATE FUNCTION statement used a wrong search path. (This is not shown by df.)



You can either tell the function to use the value in the environment, or set it explicitly to a correct value:



ALTER FUNCTION da.test_get RESET search_path;




ALTER FUNCTION da.test_get SET search_path = da, public;





share|improve this answer
























  • Great idea, i will have a try. Actually this error in the system can not be replay every time. It happens by chance.

    – Jeremy
    Sep 14 '18 at 3:34











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "182"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f217228%2fhow-to-fix-issue-uuid-generate-v1-does-not-exist-in-postgresql-actually-i-ha%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Apparently, the CREATE FUNCTION statement used a wrong search path. (This is not shown by df.)



You can either tell the function to use the value in the environment, or set it explicitly to a correct value:



ALTER FUNCTION da.test_get RESET search_path;




ALTER FUNCTION da.test_get SET search_path = da, public;





share|improve this answer
























  • Great idea, i will have a try. Actually this error in the system can not be replay every time. It happens by chance.

    – Jeremy
    Sep 14 '18 at 3:34
















0














Apparently, the CREATE FUNCTION statement used a wrong search path. (This is not shown by df.)



You can either tell the function to use the value in the environment, or set it explicitly to a correct value:



ALTER FUNCTION da.test_get RESET search_path;




ALTER FUNCTION da.test_get SET search_path = da, public;





share|improve this answer
























  • Great idea, i will have a try. Actually this error in the system can not be replay every time. It happens by chance.

    – Jeremy
    Sep 14 '18 at 3:34














0












0








0







Apparently, the CREATE FUNCTION statement used a wrong search path. (This is not shown by df.)



You can either tell the function to use the value in the environment, or set it explicitly to a correct value:



ALTER FUNCTION da.test_get RESET search_path;




ALTER FUNCTION da.test_get SET search_path = da, public;





share|improve this answer













Apparently, the CREATE FUNCTION statement used a wrong search path. (This is not shown by df.)



You can either tell the function to use the value in the environment, or set it explicitly to a correct value:



ALTER FUNCTION da.test_get RESET search_path;




ALTER FUNCTION da.test_get SET search_path = da, public;






share|improve this answer












share|improve this answer



share|improve this answer










answered Sep 13 '18 at 12:53









CL.CL.

2,68011115




2,68011115













  • Great idea, i will have a try. Actually this error in the system can not be replay every time. It happens by chance.

    – Jeremy
    Sep 14 '18 at 3:34



















  • Great idea, i will have a try. Actually this error in the system can not be replay every time. It happens by chance.

    – Jeremy
    Sep 14 '18 at 3:34

















Great idea, i will have a try. Actually this error in the system can not be replay every time. It happens by chance.

– Jeremy
Sep 14 '18 at 3:34





Great idea, i will have a try. Actually this error in the system can not be replay every time. It happens by chance.

– Jeremy
Sep 14 '18 at 3:34


















draft saved

draft discarded




















































Thanks for contributing an answer to Database Administrators Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f217228%2fhow-to-fix-issue-uuid-generate-v1-does-not-exist-in-postgresql-actually-i-ha%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Liste der Baudenkmale in Friedland (Mecklenburg)

Single-Malt-Whisky

Czorneboh