Cannot convert in dblink connection Postgresql - postgresql

i wanted to get data but different server, that why i am using DB link on postgresql
but somehow when i using on Dblink, the query return error
i cannot see what the couse is this bug?
i am using 'PostgreSQL 13.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit'

Related

Generate UUID/GUID in Postgres 12.8

I have the following postgres version, its an AWS Aurora Postgres -
"PostgreSQL 12.8 on x86_64-pc-linux-gnu, compiled by x86_64-pc-linux-gnu-gcc (GCC) 7.4.0, 64-bit"
Is it possible to generate a GUID/UUID in this version ?
Yes, just install (activate) the extension pgcrypto and you can use the function gen_random_uuid() to create a version 4 UUID.

Changes in postgresql.conf won't apply

PostgreSQL 9.2.23 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 4.8.5 20150
623 (Red Hat 4.8.5-16), 64-bit
Im try to make changes in postgresql.conf.
effective_cache_size = 3GB
but when I write SHOW effective_cache_size; It's still 128MB.
I have reloaded the postgresql, restarted it but it's still using default settings. What should I do?

How to check if my Postgres is Enterprise or Community edition?

When I select for version I get:
postgres=# SELECT version();
version
---------------------------------------------------------------------------------------------------------
PostgreSQL 10.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18), 64-bit
(1 row)
But it doesn't says anything about Enterprise/Community.

Correlated sub Query in Amazon redshift

Issue that i am facing is Correlated sub Query working fine in Redshift 1.0.1564 version , But the same query throws Amazon Invalid operation: This type of correlated subquery pattern is not supported due to internal error in Redshift 1.0.1657 version .
Any thoughts on this is highly appreciated
Below are the two difference version that i am holding for amazon redshit .
PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3), Redshift 1.0.1657
PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3), Redshift 1.0.1564
Below is the query that i am using
select * , ( SELECT a.org_id FROM derived.inv_org_d a WHERE a.org_id
=b.org_id ) FROM derived.inv_org_d b

Which is the Postgres version

I have a doubt about my version of Postgres installed in my environment.
This is my os: CentOS Linux release 7.3.1611 (Core)
In /usr/ I can see: pgsql-9.4/ folder.
But when I do: select version(); I get:
PostgreSQL 9.2.18 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 4.8.5
20150623 (Red Hat 4.8.5-11), 64-bit
So, what version do I have?
To determine the version of the database server, use select version() (from a connection to the database):
postgres=# select version();
version
----------------------------------------------------------------------------------------------------------------
PostgreSQL 9.2.14 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16), 64-bit
To determine the version of the database client, use psql --version (from your shell command line):
$ psql --version
psql (PostgreSQL) 9.6.2
The server is where data is stored. The client is the software you use to connect to the server. They can be different versions.
Simply check the version by this command: psql --version
You may of course have more than one instance of Postgresql. Try this sql to show your current instance location in case there is more than one
SHOW data_directory;