Git Product home page Git Product logo

pg-api's People

Contributors

bhmj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Forkers

luckymenslife

pg-api's Issues

first parameter for function is always 0

Hi.

why first parameter in function is always 0??

Ubuntu 20.04
Postgres 12

function hello (have on first input parameter USER_ID

-- FUNCTION: api.hello_get(integer, json)

-- DROP FUNCTION IF EXISTS api.hello_get(integer, json);

CREATE OR REPLACE FUNCTION api.hello_get(
user_id integer,
_data json)
RETURNS json
LANGUAGE 'plpgsql'
COST 100
VOLATILE PARALLEL UNSAFE
AS $BODY$
declare
_str text;
begin
_str := 'Hello there, '||coalesce(_data->>'name', 'stranger')||'!';
return json_build_object('greeting', _str);
end
$BODY$;

ALTER FUNCTION api.hello_get(integer, json)
OWNER TO postgres;

call function from chrome
http://localhost:8088/api/v1/hello/1?name=mike

LOG: {"L":"INFO","T":"2022-05-23T13:13:32.168+0300","C":"service/query.go:61","M":"select * from api.hello_get (0, 1, '{"name":"mike"}')"}

RESPONSE:
pq: function api.hello_get(integer, integer, unknown) does not exist

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.