postgresql-9.2

How to map postgresql custom enum column with Slick2.0.1?

橙三吉。 提交于 2021-02-19 02:57:05
问题 I just can't figure it out. What I am using right now is: abstract class DBEnumString extends Enumeration { implicit val enumMapper = MappedJdbcType.base[Value, String]( _.toString(), s => this.withName(s) ) } And then: object SomeEnum extends DBEnumString { type T = Value val A1 = Value("A1") val A2 = Value("A2") } The problem is, during insert/update JDBC driver for PostgreSQL complains about parameter type being "character varying" when column type is "some_enum", which is reasonable as I

Postgresql tree data structure

家住魔仙堡 提交于 2021-02-18 20:49:25
问题 I have installed Postgresql 9.2 and would like to use LTREE data type. When I try to create table as in the documentation. CREATE TABLE test (path ltree); I have error: type ltree does not exist I use pgAdmin III for this query. What am I doing wrong? Should I install this module separately. If yes, how? P.S. OS Windows. 回答1: You need to install the ltree extension by running: CREATE EXTENSION ltree; as a superuser. See the manual for details: http://www.postgresql.org/docs/current/static/sql

Not able to start PostgreSQL

ε祈祈猫儿з 提交于 2021-02-11 05:29:36
问题 Have a CentOS7 Linux machine running (not managed by me; have limited rights to/in it). Have a request to set PostgreSQL up in it. Just installed PostgreSQL from the CentOS repository: sudo yum install postgresql-server postgresql-contrib All good with it. Then did initialization of the database: sudo yum install postgresql-server postgresql-contrib All good with it. But then the start: sudo systemctl start postgresql Fails: Job for postgresql.service failed because the control process exited

psql: symbol lookup error: psql: undefined symbol: PQsetErrorContextVisibility

…衆ロ難τιáo~ 提交于 2021-02-09 09:22:15
问题 I switched my postgres version from 9.2.24 to 9.6 because I need jsonb compatibility along with other recent features. I am running a vm on centos 7. I decided to wipe all existing instances of postgres (which are almost empty since it is staging) and then installed 9.6. However, once I enter the postgres shell I received the following error when I type psql : psql: symbol lookup error: psql: undefined symbol: PQsetErrorContextVisibility I assume I need to change the path that psql is looking

psql: symbol lookup error: psql: undefined symbol: PQsetErrorContextVisibility

此生再无相见时 提交于 2021-02-09 09:21:51
问题 I switched my postgres version from 9.2.24 to 9.6 because I need jsonb compatibility along with other recent features. I am running a vm on centos 7. I decided to wipe all existing instances of postgres (which are almost empty since it is staging) and then installed 9.6. However, once I enter the postgres shell I received the following error when I type psql : psql: symbol lookup error: psql: undefined symbol: PQsetErrorContextVisibility I assume I need to change the path that psql is looking

psql: symbol lookup error: psql: undefined symbol: PQsetErrorContextVisibility

六眼飞鱼酱① 提交于 2021-02-09 09:18:04
问题 I switched my postgres version from 9.2.24 to 9.6 because I need jsonb compatibility along with other recent features. I am running a vm on centos 7. I decided to wipe all existing instances of postgres (which are almost empty since it is staging) and then installed 9.6. However, once I enter the postgres shell I received the following error when I type psql : psql: symbol lookup error: psql: undefined symbol: PQsetErrorContextVisibility I assume I need to change the path that psql is looking

psql: symbol lookup error: psql: undefined symbol: PQsetErrorContextVisibility

橙三吉。 提交于 2021-02-09 09:17:36
问题 I switched my postgres version from 9.2.24 to 9.6 because I need jsonb compatibility along with other recent features. I am running a vm on centos 7. I decided to wipe all existing instances of postgres (which are almost empty since it is staging) and then installed 9.6. However, once I enter the postgres shell I received the following error when I type psql : psql: symbol lookup error: psql: undefined symbol: PQsetErrorContextVisibility I assume I need to change the path that psql is looking

Postgresql initial configuration: How to access as the postgres user?

拜拜、爱过 提交于 2021-02-05 11:02:41
问题 After installing postgresql, I tried it out, typing createdb mydb, like it's written in the documentation. Then the following error occured: createdb: could not connect to database postgres: FATAL: role "xxx" does not exist I studied the documentation, where is said: You will need to become the operating system user under which PostgreSQL was installed (usually postgres) to create the first user account I tried this by accessing psql (in my case with sudo -u postgres psql, using Ubuntu 12.10)

Support for CHECKSUM in Oracle 11g

天大地大妈咪最大 提交于 2021-02-05 08:40:40
问题 I have the following in Postgres 9.2.4: postgres=# SELECT CHECKSUM(O_ORDERKEY) FROM tpch.orders; checksum -------------------- 322119959934139382 (1 row) Time: 41437.050 ms I have an instance of Oracle 11g database, with the same TPCH data, which I want to check consistency with the Postgres instance by comparing table checksums. From this link https://docs.oracle.com/en/database/oracle/oracle-database/20/sqlrf/checksum.html#GUID-3F55C5DF-F23A-4B2F-BC6F-E03B34B78BA8 I found out that CHECKSUM