Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Multiple problems have occurred" после обновления на версию 5.9.0 #61

Closed
Fenoman opened this issue Oct 18, 2019 · 5 comments
Labels
bug

Comments

@Fenoman
Copy link

@Fenoman Fenoman commented Oct 18, 2019

После обновления на последнюю версию при синхронизации проекта и БД появляется данное окно с множеством ошибок, все они разделяются на несколько видов:

  1. jdbc:/ut/get_exceptions line 15:19 mismatched input ';' expecting '['
    если посмотреть на код функции:
DECLARE
	_B_Ret TEXT ARRAY;

а затем изменить так:

DECLARE
	_B_Ret TEXT[];

То ошибка уйдет. Исправить конечно можно, но их очень много.

  1. jdbc:/public/userid line 9:22 mismatched input 'FROM' expecting AT, OPERATOR, BETWEEN, ILIKE, IS, ISNULL, LIKE, NOTNULL, SIMILAR, AND, ... and 24 more
    если посмотреть код функции, то проблема тут:
BEGIN
RETURN usesysid::int FROM pg_user WHERE usename = CURRENT_USER;
END

Функция работает прекрасно, в чем тут ошибка не понятно.

  1. jdbc:/pe/app_subscr_pts_loading_cr line 589:2 extraneous input 'ANALYZE' expecting {ABORT, ABSOLUTE, ACCESS, ACTION, ADD, ADMIN, AFTER, AGGREGATE, ALSO, ALTER, ALWAYS, ASSERTION, ASSIGNMENT, AT, ATTACH, ATTRIBUTE, BACKWARD, BEFORE, BEGIN, BY, CACHE, CALL, CALLED, CASCADE, CASCADED, CATALOG, CHAIN, CHARACTERISTICS, CHECKPOINT, CLASS, CLOSE, CLUSTER, COLUMNS, COMMENT, COMMENTS, COMMIT, COMMITTED, CONFIGURATION, CONFLICT, CONNECTION, CONSTRAINTS, CONTENT, CONTINUE, CONVERSION, COPY, COST, CSV, CUBE, CURRENT, CURSOR, CYCLE, DATA, DATABASE, DAY, DEALLOCATE, DECLARE, DEFAULTS, DEFERRED, DEFINER, DELETE, DELIMITER, DELIMITERS, DEPENDS, DETACH, DICTIONARY, DISABLE, DISCARD, DOCUMENT, DOMAIN, DOUBLE, DROP, EACH, ENABLE, ENCODING, ENCRYPTED, ENUM, ESCAPE, EVENT, EXCLUDE, EXCLUDING, EXCLUSIVE, EXECUTE, EXPLAIN, EXTENSION, EXTERNAL, FAMILY, FILTER, FIRST, FOLLOWING, FORCE, FORWARD, FUNCTION, FUNCTIONS, GENERATED, GLOBAL, GRANTED, GROUPS, HANDLER, HEADER, HOLD, HOUR, IDENTITY, IF, IMMEDIATE, IMMUTABLE, IMPLICIT, IMPORT, INCLUDE, INCLUDING, INCREMENT, INDEX, INDEXES, INHERIT, INHERITS, INLINE, INPUT, INSENSITIVE, INSERT, INSTEAD, INVOKER, ISOLATION, KEY, LABEL, LANGUAGE, LARGE, LAST, LEAKPROOF, LEVEL, LISTEN, LOAD, LOCAL, LOCATION, LOCK, LOCKED, LOGGED, MAPPING, MATCH, MATERIALIZED, MAXVALUE, METHOD, MINUTE, MINVALUE, MODE, MONTH, MOVE, NAME, NAMES, NEW, NEXT, NO, NOTHING, NOTIFY, NOWAIT, NULLS, OBJECT, OF, OFF, OIDS, OLD, OPERATOR, OPTION, OPTIONS, ORDINALITY, OTHERS, OVER, OVERRIDING, OWNED, OWNER, PARALLEL, PARSER, PARTIAL, PARTITION, PASSING, PASSWORD, PLANS, POLICY, PRECEDING, PREPARE, PREPARED, PRESERVE, PRIOR, PRIVILEGES, PROCEDURAL, PROCEDURE, PROCEDURES, PROGRAM, PUBLICATION, QUOTE, RANGE, READ, REASSIGN, RECHECK, RECURSIVE, REF, REFERENCING, REFRESH, REINDEX, RELATIVE, RELEASE, RENAME, REPEATABLE, REPLACE, REPLICA, RESET, RESTART, RESTRICT, RETURNS, REVOKE, ROLE, ROLLBACK, ROLLUP, ROUTINE, ROUTINES, ROWS, RULE, SAVEPOINT, SCHEMA, SCHEMAS, SCROLL, SEARCH, SECOND, SECURITY, SEQUENCE, SEQUENCES, SERIALIZABLE, SERVER, SESSION, SET, SETS, SHARE, SHOW, SIMPLE, SKIP_, SNAPSHOT, SQL, STABLE, STANDALONE, START, STATEMENT, STATISTICS, STDIN, STDOUT, STORAGE, STORED, STRICT, STRIP, SUBSCRIPTION, SUPPORT, SYSID, SYSTEM, TABLES, TABLESPACE, TEMP, TEMPLATE, TEMPORARY, TEXT, TIES, TRANSACTION, TRANSFORM, TRIGGER, TRUNCATE, TRUSTED, TYPE, TYPES, UNBOUNDED, UNCOMMITTED, UNENCRYPTED, UNKNOWN, UNLISTEN, UNLOGGED, UNTIL, UPDATE, VACUUM, VALID, VALIDATE, VALIDATOR, VALUE, VARYING, VERSION, VIEW, VIEWS, VOLATILE, WHITESPACE, WITHIN, WITHOUT, WORK, WRAPPER, WRITE, XML, YEAR, YES, ZONE, BETWEEN, BIGINT, BIT, BOOLEAN, CHAR, CHARACTER, COALESCE, DEC, DECIMAL, EXISTS, EXTRACT, FLOAT, GREATEST, GROUPING, INOUT, INT, INTEGER, INTERVAL, LEAST, NATIONAL, NCHAR, NONE, NULLIF, NUMERIC, OUT, OVERLAY, POSITION, PRECISION, REAL, ROW, SETOF, SMALLINT, SUBSTRING, TIME, TIMESTAMP, TREAT, TRIM, VALUES, VARCHAR, XMLATTRIBUTES, XMLCONCAT, XMLELEMENT, XMLEXISTS, XMLFOREST, XMLNAMESPACES, XMLPARSE, XMLPI, XMLROOT, XMLSERIALIZE, XMLTABLE, CASE, CREATE, DO, END, FETCH, FOR, GRANT, NULL, SELECT, TABLE, WITH, ALIGNMENT, BASETYPE, BUFFERS, BYPASSRLS, CANONICAL, CATEGORY, COLLATABLE, COMBINEFUNC, COMMUTATOR, CONNECT, COSTS, CREATEDB, CREATEROLE, DESERIALFUNC, DISABLE_PAGE_SKIPPING, ELEMENT, EXTENDED, FINALFUNC, FINALFUNC_EXTRA, FINALFUNC_MODIFY, FORCE_NOT_NULL, FORCE_NULL, FORCE_QUOTE, FORMAT, GETTOKEN, HASH, HASHES, HEADLINE, HYPOTHETICAL, INIT, INITCOND, INTERNALLENGTH, JSON, LC_COLLATE, LC_CTYPE, LEFTARG, LEXIZE, LEXTYPES, LIST, LOCALE, LOGIN, MAIN, MERGES, MFINALFUNC, MFINALFUNC_EXTRA, MFINALFUNC_MODIFY, MINITCOND, MINVFUNC, MODULUS, MSFUNC, MSSPACE, MSTYPE, NEGATOR, NOBYPASSRLS, NOCREATEDB, NOCREATEROLE, NOINHERIT, NOLOGIN, NOREPLICATION, NOSUPERUSER, OUTPUT, PASSEDBYVALUE, PATH, PERMISSIVE, PLAIN, PREFERRED, PROVIDER, READ_ONLY, READ_WRITE, RECEIVE, REMAINDER, REPLICATION, RESTRICTED, RESTRICTIVE, RIGHTARG, SAFE, SEND, SERIALFUNC, SFUNC, SHAREABLE, SORTOP, SSPACE, STYPE, SUBTYPE_DIFF, SUBTYPE_OPCLASS, SUBTYPE, SUMMARY, SUPERUSER, TIMING, TYPMOD_IN, TYPMOD_OUT, UNSAFE, USAGE, VARIABLE, YAML, ALIAS, ASSERT, CONSTANT, DATATYPE, DEBUG, DETAIL, DIAGNOSTICS, ELSEIF, ELSIF, ERRCODE, EXIT, EXCEPTION, FOREACH, GET, HINT, INFO, LOG, LOOP, MESSAGE, NOTICE, OPEN, PERFORM, QUERY, RAISE, RECORD, RETURN, REVERSE, ROWTYPE, SLICE, SQLSTATE, STACKED, WARNING, WHILE, '(', '<<', DOLLAR_NUMBER, Identifier, QuotedIdentifier}
    Если посмотреть код функции то проблемы вызывает этот кусок:
ANALYZE Tmp.PE_ED_Pts;

Что тут не так, тоже не понятно.

  1. jdbc:/pe/app_subscr_pts_loading_cr line 589:23 mismatched input ';' expecting '=', '.', '[', ':='
    Эта же функция что в п.3 и даже этаже строка. Тут вообще не понятно на что ругается.

  2. /Users/fenoman/OmniX_DB/DB/SCHEMA/dbo/FUNCTION/trigger_sd_contract_squares.sql line 11:1 null
    Тут тоже вообще не понятно. Приведу начало функции:

CREATE FUNCTION trigger_sd_contract_squares
(
) RETURNS trigger
	SECURITY DEFINER
	LANGUAGE plpgsql
AS
$$
	-- @formatter:off
/*==============================================================================================================================================================
Author:      	e-pavlichenko
Create date: 	04.08.2019
Alter date:		02.08.2019 переписан весь код, данные обрабатываем массово
Description:	Синхрониация прощадей
Params:
==============================================================================================================================================================*/
-- @formatter:on
DECLARE
    _level int;
BEGIN
...
@Endeavourl Endeavourl added the bug label Oct 21, 2019
@Skoffer

This comment has been minimized.

Copy link

@Skoffer Skoffer commented Oct 28, 2019

Аналогичные ошибки у меня

1. process_materialized_views.sql line 2:1 null

CREATE OR REPLACE FUNCTION ignitemart.process_materialized_views(in_etl_batch_id bigint, in_ticketid uuid) RETURNS void
    LANGUAGE plpgsql
    AS $$
DECLARE
l_procedure_name CONSTANT text := 'process_materialized_views';
l_module_name CONSTANT text := 'process_materialized_views';
BEGIN

2. function definition of email_results_participants_api line 219:17 mismatched input '.' expecting TO, '='

set pg_hint_plan.enable_hint to on;

3. function definition of perform_table_retention line 5:14 extraneous input 'record' expecting {ARRAY, COLLATE, DEFAULT, NOT, '=', ';', '(', '[', ':='}

CREATE OR REPLACE FUNCTION etl_utils.perform_table_retention() RETURNS void
    LANGUAGE plpgsql
    AS $$
DECLARE _procedure_name CONSTANT text := 'perform_table_retention';
DECLARE _rec record;
DECLARE _ticket_id uuid;
DECLARE _etl_batch_id bigint;
DECLARE _status json;
BEGIN
  1. function definition of process_materialized_views line 38:11 mismatched input 'MATERIALIZED' expecting '=', '.', '[', ':='

refresh MATERIALIZED view concurrently ignitemart.t_petition_activity_a with data;

@Endeavourl

This comment has been minimized.

Copy link
Contributor

@Endeavourl Endeavourl commented Oct 28, 2019

  1. process_materialized_views.sql line 2:1 null

Вы можете для таких ошибок скопировать сюда стектрейс NullPointerException из Errrol log? (Ctrl+3, Error Log, Enter)
Или прикрепить лог из workspace/.metadata/.log

@Skoffer

This comment has been minimized.

Copy link

@Skoffer Skoffer commented Oct 28, 2019

!ENTRY apgdiff 4 0 2019-10-28 14:57:51.001
!MESSAGE C:\DEV\Datamart\git\datamart_ignite\pgcodekeeper\SCHEMA\ignitemart\FUNCTION\refresh_materialized_views.sql line 2:1 null
!STACK 0
java.lang.NullPointerException
	at cz.startnet.utils.pgdiff.parsers.antlr.expr.Select.perform(Select.java:120)
	at cz.startnet.utils.pgdiff.parsers.antlr.expr.Select.analyze(Select.java:108)
	at cz.startnet.utils.pgdiff.parsers.antlr.expr.Function.base(Function.java:184)
	at cz.startnet.utils.pgdiff.parsers.antlr.expr.Function.statements(Function.java:161)
	at cz.startnet.utils.pgdiff.parsers.antlr.expr.Function.control(Function.java:221)
	at cz.startnet.utils.pgdiff.parsers.antlr.expr.Function.statements(Function.java:163)
	at cz.startnet.utils.pgdiff.parsers.antlr.expr.Function.block(Function.java:75)
	at cz.startnet.utils.pgdiff.parsers.antlr.expr.Function.analyze(Function.java:66)
	at cz.startnet.utils.pgdiff.parsers.antlr.expr.Function.analyze(Function.java:1)
	at cz.startnet.utils.pgdiff.parsers.antlr.expr.launcher.AbstractAnalysisLauncher.analyze(AbstractAnalysisLauncher.java:77)
	at cz.startnet.utils.pgdiff.parsers.antlr.expr.launcher.FuncProcAnalysisLauncher.analyze(FuncProcAnalysisLauncher.java:73)
	at cz.startnet.utils.pgdiff.parsers.antlr.expr.launcher.AbstractAnalysisLauncher.launchAnalyze(AbstractAnalysisLauncher.java:64)
	at cz.startnet.utils.pgdiff.loader.FullAnalyze.fullAnalyze(FullAnalyze.java:47)
	at cz.startnet.utils.pgdiff.loader.FullAnalyze.fullAnalyze(FullAnalyze.java:28)
	at ru.taximaxim.codekeeper.ui.pgdbproject.parser.UIProjectLoader.loadDatabaseWithLibraries(UIProjectLoader.java:301)
	at ru.taximaxim.codekeeper.ui.differ.DbSourceProject.loadInternal(DbSource.java:208)
	at ru.taximaxim.codekeeper.ui.differ.DbSource.get(DbSource.java:72)
	at ru.taximaxim.codekeeper.ui.differ.TreeDiffer$DbSourceJob.run(TreeDiffer.java:157)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)

.log

@Endeavourl

This comment has been minimized.

Copy link
Contributor

@Endeavourl Endeavourl commented Oct 31, 2019

исправлено в babcb48
если что-то продолжит падать, пишите сюда

@Endeavourl Endeavourl closed this Oct 31, 2019
@Fenoman

This comment has been minimized.

Copy link
Author

@Fenoman Fenoman commented Oct 31, 2019

Хорошо! Спасибо огромное!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.