pg_sql | Unsorted

Telegram-канал pg_sql - PostgreSQL

2806

English speaking PostgreSQL public chat. This group is for discussions on PostgreSQL-related topics and strives to provide best-effort support as well.

Subscribe to a channel

PostgreSQL

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

Читать полностью…

PostgreSQL

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

Читать полностью…

PostgreSQL

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?

Читать полностью…

PostgreSQL

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)


So there's no way around setting one of the operands to a type that will fit the result.

Читать полностью…

PostgreSQL

Yes, you need to cast the first one to bigint, so that the whole operation is made with bigint

Читать полностью…

PostgreSQL

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;

Читать полностью…

PostgreSQL

[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]$

Читать полностью…

PostgreSQL

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

Читать полностью…

PostgreSQL

[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

Читать полностью…

PostgreSQL

Find if you have installed libnsl library and if you have in your system, include it in ldlibrarypath variable

Читать полностью…

PostgreSQL

while installing Install Oracle database driver for the DBI module(DBD-Oracle )

Читать полностью…

PostgreSQL

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

Читать полностью…

PostgreSQL

You do not specify "how" you tried to extract that file, and how this is failing.

Читать полностью…

PostgreSQL

I pinged screen shot to you -FYI

Читать полностью…

PostgreSQL

How exactly do you expect anyone to help you when you do not provide more information.

Читать полностью…

PostgreSQL

I am using Nifi with "CSVRecordSetWriter" in order to create the CSV. but I keep on failing.

Читать полностью…

PostgreSQL

Have a valid CSV file

Читать полностью…

PostgreSQL

Ah, i always assumed they used the first one. Today i learned

Читать полностью…

PostgreSQL

You cannot use smallint/int if the result does not fit

Читать полностью…

PostgreSQL

We migrated code from firebird to postgres.. Around 300 procedures are using small int

Читать полностью…

PostgreSQL

[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...

Читать полностью…

PostgreSQL

please suggest on this

Читать полностью…

PostgreSQL

Has anyone tried multi-master via logical replication in v17? Is the with origin option mature enough for heavy-load transactions?

Читать полностью…

PostgreSQL

issue fixed by
cd /usr/lib64/

ln -s /usr/lib64/libnsl.so.1 libnsl.so

Читать полностью…

PostgreSQL

You can follow the installation process as this docker image https://github.com/Bluestep-Systems/ora2pg-docker/blob/main/Dockerfile

Читать полностью…

PostgreSQL

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

Читать полностью…

PostgreSQL

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.

Читать полностью…

PostgreSQL

I'm not interested in any private messages which ask me for support. Post this here.

Читать полностью…

PostgreSQL

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

Читать полностью…

PostgreSQL

Please help me on oracle_fdw.dll file this

Читать полностью…
Subscribe to a channel