Questions tagged as 'postgresql'

0
answers

Replication in postgres 9.4

Good evening everyone. I am trying to do a replication in postgresql 9.4. I made the exact same settings as the files postgres.conf and pg_hba.conf in master and slave , but when I drop master the slave disconnects. I wonder...
asked by 06.03.2015 / 01:52
2
answers

How to migrate data from a Postgres table to Oracle? [closed]

NOTE: In short, the database that was in postgres was migrated to oracle, but a table that is not automatically migrated by the system was missing. I want to know what is the best way to do this if you can do it manually or use some tool betw...
asked by 26.01.2017 / 20:21
1
answer

Query to return recurrence values, which have not yet been created in the database

I need to query the database where the records are not yet saved. I'll explain better: In a system that I am developing, the user can register a recurring expense, that is, that will repeat every month / days (according to the user's choice)....
asked by 12.12.2015 / 18:05
2
answers

Type suitable for use with CPF is numeric or character?

I have a database with two tables that store the CPF. In one of them the CPF is stored as numeric(11,0) and in the other the CPF is stored as character . If there is any difference, which of the two data types takes up more stora...
asked by 26.09.2017 / 20:53
3
answers

I can not connect to postgreSQL in php

I'm trying to make a Login system in PHP using PostgreSQL however, I can not get my application to connect to the Database. follow the code: <?php $connect = pg_connect("dbname=testebd"); //Banco de dados previamente criado if (!...
asked by 26.11.2015 / 03:57
1
answer

PostgreSQL - Add existing values of the current Month

Good staff I have a table with date column of certain records. I know to add up the records for a given day: SELECT SUM(CAST(REPLACE(coluna1,',','.') AS DOUBLE PRECISION)) FROM tabela1 where CAST(data as date)=current_date and xxxxx='111111...
asked by 14.04.2014 / 11:50
1
answer

How not to initialize postgresql with ubuntu?

When I run the command sudo service postgresql status the following information appears: 9.3/main (port 5432): online How do I stop PostgreSQL from booting with Ubuntu 14 LTS?     
asked by 04.02.2015 / 14:48
3
answers

LIKE and IN command in the same SQL command

Is it possible to use like and in in the same SQL command? For example, I need to search the stock table for the Serial Number that can be 'SCAB171293E29','SCAB171293E4E' but it might be that they have something else in th...
asked by 09.11.2017 / 18:30
3
answers

Order By - Leave specific record by first

Store_Name | Sales | Date America | 1500 | 05-Jan-1999 Boston | 700 | 08-Jan-1999 Canada | 300 | 08-Jan-1999 Dinamarca | 250 | 07-Jan-1999 I have this table, I would like to sort it in a way where Boston would be the...
asked by 23.07.2014 / 15:49
3
answers

Error in POSTGRESQL Bank Creation

I'm having the following error when creating a POSTGRESQL database: SQL CODE: CREATE DATABASE pesadaum; CREATE TABLE user( user_id int PRIMARY KEY NOT NULL AUTO_INCREMENT, email varchar(255) NOT NULL, heavy_pass varchar(...
asked by 08.06.2016 / 14:43