Questions tagged as 'postgresql'

1
answer

save time in the Postgresql database

In the application I inform the start and end time of the activity, and save this information in the database. Follow Query: $status = $_GET['status']; $intervalo = $_GET['intervalo']; $dataini = $_GET['horainicio']."<br>"; $horainici...
asked by 15.06.2018 / 17:56
3
answers

Finding pg_dump and pg_restore (PostgreSQL) on my computer with C #

To perform backup and restore to a PostgreSQL database using C # you need to find some files like pg_dump and pg_restore . How do I make a function to be able to find the files? or a kind of scan on the computer, to find PostgreS...
asked by 07.09.2017 / 01:12
1
answer

Error trying to migrate bd from Laravel to PostgreSQL

I'm using PostgreSQL "5.4. *" Using MySQL, after php artisan migrate ok. But now I need to use PostgreSQL in the project, but after changing the DB: DB_CONNECTION=pgsql DB_HOST=127.0.0.1 DB_PORT=5432 DB_DATABASE=laravel-api DB_USE...
asked by 17.10.2017 / 20:25
2
answers

Duplicate the result of Select Postgresql

I have a record that is a receipt, and in select, I want the line to be duplicated. Ex: Select * from recibos where codigo =1; Result: codigo|cliente|valor|emitente|data 1 Fulano 10 Ciclano 19/10/2017 Result I need: codigo...
asked by 19.10.2017 / 18:44
1
answer

Mult Mapping Dapper [duplicate]

I'm having problems with dapper's Mult Mapping, when I try to execute the following query it is not mapping the ids of the objects, the select is this: var sql = @" SELECT ofi.id_oficina, ofi.codigo,...
asked by 27.01.2017 / 13:10
1
answer

What is the difference between the serial and integer data type in PostgreSQL?

I am creating a database in PostgreSQL and struck the question how can I create in the table the field ID with AUTO_INCREMENT, searching the internet I found some examples with the ID field with SERIAL data type and others with INTEGER data type...
asked by 06.07.2017 / 17:13
2
answers

Adding POSTGRESQL values

I have a historicos table: historicos id | problemas | total | data ---|-----------|-------|------------ 01 | 25 | 125 | 2017-01-01 ---|-----------|-------|------------ 03 | 25 | 125 | 2017-03-01 ---|--------...
asked by 20.04.2017 / 16:09
2
answers

Rows in Columns (SQL)

I've been thinking of a few days ago to make a select less verbose, turning rows into columns. Today I have it this way: (SELECT s.code_sample FROM app_sample s WHERE s.id_analysis = a.id AND s.sequential_order =...
asked by 01.06.2017 / 18:55
1
answer

SELECT problems with postgresql

I am doing a migration from mysql to postgres, but there is a mistake, not much experience with postgres: SELECT SELECT m.* , (SELECT c.id FROM corridas c WHERE c.motoqueiro = m.id AND (c.s...
asked by 09.08.2016 / 17:10
2
answers

Share database in the cloud (PostgreSQL)?

Is it possible to share a database (PostgreSQL) in the cloud, such as Dropbox, Google Drive? I want to share my database, initially to access from different environments, just to start a new application. Is it possible in any cloud service...
asked by 29.07.2016 / 16:51