libpg_query
libpg_query copied to clipboard
fix some plpgsql errors
This patch fixes the #243 , #160 , #248 issues and the following errors: "variable "$1" does not exist" "collations are not supported by type -" "variable "ref" must be of type cursor or refcursor" missing expression at or near ";"
changes in JSON:
- add declared variable with "alliasfor" parameter pointing to associated variable, e.g. DECLARE _a ALIAS FOR $1;
{
PLpgSQL_var: {
refname: '_a',
aliasfor: '$1',
lineno: 3,
datatype: { PLpgSQL_type: { typname: 'text' } }
}
- add "retvarno" parameter for RETURN NEXT statement
{
PLpgSQL_stmt_return_next: { lineno: 6, retvarno: 2 }
}