Question

I have created a PostgreSql stored procedure:

CREATE OR REPLACE FUNCTION "MySchema".UserAccountInsert(
    id             bigint,
    lang           varchar(3),
    nname           varchar(40),
    email          varchar(40),
    email_conf     boolean,
    status         smallint,
    status_update  bigint,
    creation       bigint,
    preferences    json)
    RETURNS bigint AS $BODY$
DECLARE
    ...
BEGIN
    ...
    RETURN ret_id;
END; $BODY$
LANGUAGE plpgsql;

I am trying to call it from pgAdmin III with the following statement;

SELECT * from "MySchema".UserAccountInsert(
1000,"ENG","name1000","email1000","f",1,1391878008121,1391878008121,"{}");

But I get the following error:

ERROR:  column "ENG" does not exist
LINE 36: SELECT * from "MySchema".UserAccountInsert(1000,"ENG","name1...

What is the right way to call this procedure? Eventually, it will be called from Node's PG module, so I am looking for the proper query statement. Thanks.

Was it helpful?

Solution

The issue has disappeared with the following SQL statement:

SELECT "MySchema".UserAccountInsert(
    1000::bigint,
    'ENG'::varchar(3),
    'name1000'::varchar(40),
    'email1000'::varchar(40),
    'f'::boolean,
    1::smallint,
    1391878008121::bigint,
    1391878008121::bigint,
    '{}'::json);

but I am getting another error message. I am creating another question.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top