2012-02-02 23:11:02
linux
, 2012-02-02 23:11:02

1C 8.2 +linux +Postgres

I assembled a small 1C server on Linux fedora + Postgresql 9.1.2 + 1C server version 8.2.14.533

from under Windows 1C, I'm trying to upload the configuration to the server.

Postgres complains about the following:

ERROR: syntax error at or near "SECOND" at character 227
STATEMENT: CREATE OR REPLACE FUNCTION public.datediff(varchar, timestamp, timestamp)
RETURNS int4 AS
'
DECLARE
arg_mode alias for $1;
arg_d2 alias for $2;
arg_d1 alias for $3;
BEGIN
if arg_mode = \'SECOND\' then
return date_part(\'epoch\',arg_d1) - date_part(\'epoch\',arg_d2);
elsif arg_mode = \'MINUTE\' then
return ceil((date_part(\'epoch\',arg_d1) — date_part(\'epoch\',
elsif arg_mode = \'HOUR\' then
return ceil((date_part(\'epoch\',arg_d1) - date_part(\'epoch\',arg_d2)) /3600);
elsif arg_mode = \'DAY\' then
return cast(arg_d1 as date) - cast(arg_d2 as date);
elsif arg_mode = \'WEEK\' then
return ceil( ( cast(arg_d1 as date) - cast(arg_d2 as date) ) / 7.0);
elsif arg_mode = \'MONTH\' then
return 12 * (date_part(\'year\',arg_d1) - date_part(\'year\',arg_d2))
+ date_part(\'month\',arg_d1) - date_part(\ 'month\',arg_d2);
elsif arg_mode = \'QUARTER\' then
return 4 * (date_part(\'year\',arg_d1) - date_part(\'year\',arg_d2))
+ date_part(\'quarter\', arg_d1) - date_part(\'quarter\',arg_d2);
elsif arg_mode = \'YEAR\' then
return (date_part(\'year\',arg_d1) - date_part(\'year\',arg_d2));
end if;
END
'
LANGUAGE 'plpgsql' VOLATILE;

Maybe someone knows how to get around this, because even if I process this request, eliminating the error, I won’t be able to upload the configuration again to the same database. 1C swears that the database is not usable.

Answer the question

In order to leave comments, you need to log in

8 answer(s)
S
Solver, 2012-02-03
Krechet

With reading of docks also it was necessary to begin. 1C will not work with regular postgri...

V
VeMax, 2012-02-03
@VeMax

Tried:

backslash_quote = safe_encoding
escape_string_warning = off
standard_conforming_strings = off

B
beho1der, 2012-02-03
@beho1der

1C will not work on the regular version of Postgres, I tried to compile with patches from 1C a couple of times, but nothing normal came out, errors constantly climbed, you'd better take the ready-made version of postgree from 1C in the form of RPM, just as they wrote above, you can take the patched etersoft'tom I have them working without problems!

B
beho1der, 2012-02-03
@beho1der

then so www.onlinedisk.ru/file/818264/

R
RuJet, 2012-02-03
@RuJet

Also tried to run on the 9th version. Did not work out.
As a result, I took the 8th version from the etersoft website. Everything works perfectly.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question