Apparently, it's just that the operator fitting best without a CAST is picked:
Schema | Name | Left arg type | Right arg type | Result type | DescriptionЧитать полностью…
------------+------+---------------+----------------+-------------+-------------
pg_catalog | * | bigint | bigint | bigint | multiply
pg_catalog | * | bigint | integer | bigint | multiply
pg_catalog | * | bigint | money | money | multiply
pg_catalog | * | bigint | smallint | bigint | multiply
pg_catalog | * | integer | bigint | bigint | multiply
pg_catalog | * | integer | integer | integer | multiply
pg_catalog | * | integer | money | money | multiply
pg_catalog | * | integer | smallint | integer | multiply
pg_catalog | * | smallint | bigint | bigint | multiply
pg_catalog | * | smallint | integer | integer | multiply
pg_catalog | * | smallint | money | money | multiply
pg_catalog | * | smallint | smallint | smallint | multiply
Thankfully, the postgresql parser will notify you of such errors, so that you don't end up importing corrupted data. Set the QUOTE correct and it should import right away assuming it's not invalid
Читать полностью…What is the best way to COPY csv file without keep failing because delimiter sometimes is within the string? or there's line break and etc?
Читать полностью…A smallint is 16 bit IIRC, an INT is 32 bit.
The multiplication is done *before* the assignment to "C", and multiplications are always using the bigger of the the two operand types.
Like:
bluth=> select 5000::smallint * 1000::smallint;
ERROR: smallint out of range
bluth=> select 5000::smallint * 1000::int;
?column?
----------
5000000
(1 Zeile)
Yes, you need to cast the first one to bigint, so that the whole operation is made with bigint
Читать полностью…When i multiple two small integer, getting this error
Smallint out of range
Example
A smallint:=5000
B smallint :=1000
C integer;
C:=A*B;
[root@lsp-oratl01 ora2pg]# export ORACLE_HOME=/u1/oracle/app/oracle/product/19.0.0/client_2
[root@lsp-oratl01 ora2pg]# export PATH=$PATH:$ORACLE_HOME/bin
[root@lsp-oratl01 ora2pg]# export LD_LIBRARY_PATH=$ORACLE_HOME/lib
[root@lsp-oratl01 ora2pg]# ora2pg -t SHOW_VERSION -c ora2pg.conf
FATAL: 2000000000 ... Failed to allocate OCIEnv
Aborting export...
[root@lsp-oratl01 ora2pg]# pwd
/etc/ora2pg
[root@lsp-oratl01 ora2pg]# su - postgres
Last login: Tue Nov 5 20:49:07 UTC 2024 on pts/3
[postgres@lsp-oratl01 ~]$ cd /etc/ora2pg
[postgres@lsp-oratl01 ora2pg]$ export ORACLE_HOME=/u1/oracle/app/oracle/product/19.0.0/client_2
[postgres@lsp-oratl01 ora2pg]$ export PATH=$PATH:$ORACLE_HOME/bin
[postgres@lsp-oratl01 ora2pg]$ export LD_LIBRARY_PATH=$ORACLE_HOME/lib
[postgres@lsp-oratl01 ora2pg]$ ora2pg -t SHOW_VERSION -c ora2pg.conf
install_driver(Oracle) failed: Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.19.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 193.
at (eval 14) line 3.
Compilation failed in require at (eval 14) line 3.
Perhaps a required shared library or dll isn't installed where expected
at /usr/local/share/perl5/Ora2Pg/Oracle.pm line 144.
[postgres@lsp-oratl01 ora2pg]$
In file included from Pg.xs:14:
Pg.h:35:10: fatal error: libpq-fe.h: No such file or directory
#include "libpq-fe.h"
^~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:357: Pg.o] Error 1
[root@lsp-oratl01 software]# cd DBD-Pg-3.18.0
[root@lsp-oratl01 DBD-Pg-3.18.0]# perl Makefile.PL
Configuring DBD::Pg 3.18.0
Path to pg_config? /usr/pgsql-16/bin
sh: /usr/pgsql-16/bin: Is a directory
Enter a valid PostgreSQL postgres major version number 16
Enter a valid PostgreSQL postgres minor version number 16
Enter a valid PostgreSQL postgres patch version number 16
sh: /usr/pgsql-16/bin: Is a directory
sh: /usr/pgsql-16/bin: Is a directory
Enter a valid PostgreSQL postgres bin dir
getting struck here
Find if you have installed libnsl library and if you have in your system, include it in ldlibrarypath variable
Читать полностью…Windows user probably. Not many use windows except for pc games. Better ask on it's github, there are similar questions answered already.
https://github.com/laurenz/oracle_fdw
How exactly do you expect anyone to help you when you do not provide more information.
Читать полностью…I am using Nifi with "CSVRecordSetWriter" in order to create the CSV. but I keep on failing.
Читать полностью…We migrated code from firebird to postgres.. Around 300 procedures are using small int
Читать полностью…[oracle@lsp-oratl01 ora2pg]$ export ORACLE_HOME=/u1/oracle/app/oracle/product/19.0.0/client_2
[oracle@lsp-oratl01 ora2pg]$ export LD_LIBRARY_PATH=/u1/oracle/app/oracle/product/19.0.0/client_2/lib
[oracle@lsp-oratl01 ora2pg]$ ora2pg -t SHOW_VERSION -c ora2pg.conf
FATAL: 2000000000 ... Failed to allocate OCIEnv
Aborting export...
Has anyone tried multi-master via logical replication in v17? Is the with
origin
option mature enough for heavy-load transactions?
You can follow the installation process as this docker image https://github.com/Bluestep-Systems/ora2pg-docker/blob/main/Dockerfile
Читать полностью…please suggest
/usr/bin/ld: cannot find -lnsl
collect2: error: ld returned 1 exit status
make: *** [Makefile:527: blib/arch/auto/DBD/Oracle/Oracle.so] Error 1
Can you please put yourself into the position of another reader of your messages, and try to understand if anyone can follow your actions and see what you are doing and where you are failing. You do not provide enough information for anyone to follow you or see what you are doing.
Читать полностью…I'm not interested in any private messages which ask me for support. Post this here.
Читать полностью…Ok Andreas , unable to run create extension db_link; in postgres DB .getting error like oracle_fdw.dll file doesn't exit for specified path .tried to extract from oracle_fdw.sln file but unable to do it if any one having oracle_fdw.dll file for postgresql version 16 please provide it
Читать полностью…