Databases

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Error calling self-made plpgsql function "function XYZ(bigint) does not exist"

    5 answers - 1153 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hi
    I have problem calling my function (prety easy):
    == sql begin ==
    CREATE R REPLACE FUNCTIN "InventGroups_GetAllParents"(int8)
    RETURNS SETF "ItemGroupRelationNode" AS
    $BDY$declare
    R RECRD;
    SR RECRD;
    begin
    FR R IN select ItemGroupId, ParentItemGroupId
    from InventGroups where ItemGroupId = $1 and ItemGroupId 0
    LP
    RETURN NEXT R;
    SR IN select * from InventGroups_GetAllParents(
    R.ParentItemGroupId::int8 )
    -- RETURN NEXT SR;
    LP;
    END LP;
    RETURN;
    end;$BDY$
    LANGUAGE 'plpgsql' VLATILE;
    == sql end ==
    "ItemGroupRelationNode" is a complex type
    CREATE TYPE "ItemGroupRelationNode" AS
    ("ItemGroupId" int8,
    "ParentItemGroupId" int8);
    The result is:
    select * from InventGroups_GetAllParents(0::int8)
    ERRR: function inventgroups_getallparents(bigint) does not exist
    HINT: No function matches the given name and argument types. You may
    need to add explicit type casts.
    Thanks for responce
    (end of broadcast)
    TIP 4: Have you searched our list archives?
    http://archives.postgresql.org
  • No.1 | | 885 bytes | |

    Jan 19, 2006, at 21:39 , Juris wrote:

    == sql begin ==
    CREATE R REPLACE FUNCTIN "InventGroups_GetAllParents"(int8)

    select * from InventGroups_GetAllParents(0::int8)

    ERRR: function inventgroups_getallparents(bigint) does not exist
    HINT: No function matches the given name and argument types. You may
    need to add explicit type casts.

    If you double-quote your function name (or any identifier) when you
    create it, you'll need to double-quote them when you call the
    function as well. Try:

    select * from "InventGroups_GetAllParents"(0::int8)

    Michael Glaesemann
    grzm myrealbox com

    (end of broadcast)
    TIP 1: if posting/reading through Usenet, please send an appropriate
    subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
    message can get through to the mailing list cleanly
  • No.2 | | 1111 bytes | |

    Argh big thanks did not know what pgAdmin/PG have any
    case-sensitive issues with functions

    Also for fields it is relative without dbl-quotes i could not query
    anything (i am using "MySuperField"-like field names)

    2006/1/19, Michael Glaesemann <grzm (AT) myrealbox (DOT) com>:

    Jan 19, 2006, at 21:39 , Juris wrote:

    == sql begin ==
    CREATE R REPLACE FUNCTIN "InventGroups_GetAllParents"(int8)

    select * from InventGroups_GetAllParents(0::int8)

    ERRR: function inventgroups_getallparents(bigint) does not exist
    HINT: No function matches the given name and argument types. You may
    need to add explicit type casts.

    If you double-quote your function name (or any identifier) when you
    create it, you'll need to double-quote them when you call the
    function as well. Try:

    select * from "InventGroups_GetAllParents"(0::int8)

    Michael Glaesemann
    grzm myrealbox com
    >
    >
    >
    >


    (end of broadcast)
    TIP 5: don't forget to increase your free space map settings
  • No.3 | | 652 bytes | |

    Jan 20, 2006, at 1:45 , Leif B. Kristensen wrote:

    That is usual behaviour for RDBMSes. They are case-insensitive if you
    use ALL_CAPS or small_letters only.

    PostgreSQL is case-insensitive in the sense that it down-cases
    identifiers that are not double-quoted, e.g.,

    MYSUPERFIELD -mysuperfield
    MySuperField -mysuperfield
    mysuperfield -mysuperfield

    "MYSUPERFIELD" -MYSUPERFIELD
    "MySuperField" -"MySuperField"
    "mysuperfield" -mysuperfield

    Michael Glaesemann
    grzm myrealbox com

    (end of broadcast)
    TIP 4: Have you searched our list archives?

    http://archives.postgresql.org
  • No.4 | | 1347 bytes | |

    Jep but pgAdmin_III inserts dbl-quotes, if there is some
    CamelCase but from sql-console i can create objects w/ or w/o
    dbl-quotes, but in result i always get lower-cased objects

    Seems, i should `recreate` my db in lowercase it will take some time :(

    Thanks for advance.

    PS: problem here is that, then i initialize row in PHP, i do $row =
    $dbio->object($res)
    and PHP variables/object_properties ar case-sensitive

    2006/1/20, Michael Glaesemann <grzm (AT) myrealbox (DOT) com>:

    Jan 20, 2006, at 1:45 , Leif B. Kristensen wrote:

    That is usual behaviour for RDBMSes. They are case-insensitive if you
    use ALL_CAPS or small_letters only.

    PostgreSQL is case-insensitive in the sense that it down-cases
    identifiers that are not double-quoted, e.g.,

    MYSUPERFIELD -mysuperfield
    MySuperField -mysuperfield
    mysuperfield -mysuperfield

    "MYSUPERFIELD" -MYSUPERFIELD
    "MySuperField" -"MySuperField"
    "mysuperfield" -mysuperfield

    Michael Glaesemann
    grzm myrealbox com
    >
    >
    >
    >

    (end of broadcast)
    TIP 4: Have you searched our list archives?

    http://archives.postgresql.org

    (end of broadcast)
    TIP 4: Have you searched our list archives?

    http://archives.postgresql.org
  • No.5 | | 347 bytes | |

    Hi, Juris,

    Juris wrote:

    Seems, i should `recreate` my db in lowercase it will take some time :(

    Maybe you can modify it "inplace" using

    ALTER TABLE "Name" RENAME T newname;

    This might even be scripted, select * from pg_tables where
    schemaname='your schema' gives a list of all tables.

    Markus

Re: Error calling self-made plpgsql function "function XYZ(bigint) does not exist"


max 4000 letters.
Your nickname that display:
In order to stop the spam: 0 + 9 =
QUESTION ON "Databases"

EMSDN.COM