Questions tagged as 'postgresql'

1
answer

How to merge multiple updates into different tables?

I have 3 updates, and the tables I have to give the updates have 2 million records, so it would be unfeasible to do one by one, since each one takes more than half an hour to run, and wait for one to finish. running the other is not productive....
asked by 07.08.2018 / 15:42
1
answer

Migration Conventions

I have an MVC application in DDD that uses SQLServer. I'm looking to take the database to PostGresSQL, but an FK duplicity error occurs. For example, in the SqlServer pattern would be generated: FK_dbo.Adicao_dbo.OrgaoEmissorAtoLegal_ExT...
asked by 05.10.2018 / 21:19
1
answer

Why does my DriverManager return null pointer?

PostgreSQL 9.4 I run my class Noticias() . Within method public static void main() of class Noticias() the call is made from a getConexao() method; When I run pagecontroller?=p=noticias in the browser...
asked by 20.06.2015 / 19:44
2
answers

Connection refused error when connecting to PostgreSQL

The error happens after entering login and password:    "Deuorg.postgresql.util.PSQLException: Connection refused. Check that   the hostname and port are correct and that the postmaster is accepting   TCP / IP connections. " I'm making the...
asked by 06.06.2014 / 14:13
1
answer

Bypassing the primary key duplication error

Hello, I have the following script, .sql, to create a table and also create a trigger. SET client_encoding TO 'LATIN1'; CREATE OR REPLACE FUNCTION before_insert() RETURNS trigger AS ' DECLARE n integer; BEGIN IF tg_op = ''INSERT'...
asked by 19.01.2018 / 18:41
1
answer

Error in table change in PostgreSQL. How do I change the type of a colulna int to the timestamp type?

I am studying PostgreSQL DB for a recent book I purchased. When trying to change a tab based on the command I learned in the book, an error occurred, I used exactly the same command written in the book without change. I am trying to change a fie...
asked by 17.11.2018 / 16:57
2
answers

SQL: Doubt in Relationship between Tables

I'm creating an academic system that consists of a virtual restaurant menu type, so I've created three tables in the database: Menu Items Table: CREATE TABLE ITEMS( ID INT PRIMARY KEY NOT NULL, NOME VARCHAR(20) NOT NULL, DESCRIC...
asked by 05.09.2017 / 13:48
1
answer

Laravel Undefined column: 7 ERROR: column "1" does not exist

In join , I am passing a direct value, and Laravel is trying to "read" this value as if it were a table. function ($join) { $join ->on('e.pee_fk_pes_codigo', '=', 'p.pes_codigo') ->on('e.pee_padrao', '=', '1'); }...
asked by 10.08.2016 / 15:41
3
answers

How to remove duplicate data in this query? [duplicate]

Hey blz personal? Next I'm using this query: select products.id as product_id, offers.id as offer_id, companies.id as company_id, products.title, (ST_Distance(companies.location, 'POINT(-48.030322 -15.839689)':: g...
asked by 02.09.2016 / 18:32
0
answers

PostgreSQL NoSQL and integration between relational and non-relational databases

I've been searching for PostgreSQL NoSQL and found the Key-Value Stores concept in some HSTORE publications. I also looked into the integration between PostgreSQL and the Spring framework and found the following code example: package com.j...
asked by 01.11.2015 / 17:04