Questions tagged as 'postgresql'

1
answer

Insert with random characters - PostgreSQL

I have a function that does an insert when a given action occurs, I am trying to insert random letters together but I am not finding anything related to this, Is it possible to do this in Postgresql?     
asked by 02.02.2018 / 17:35
1
answer

Update an attribute according to two other tables

Company Table CREATE TABLE empresa ( cnpj char(18) PRIMARY KEY, nome varchar(60) NOT NULL UNIQUE, receita float NOT NULL, pais_sede varchar(26) NOT NULL ); Target table CREATE TABLE destino( cidade...
asked by 30.11.2017 / 01:33
1
answer

Importing XLS to PgAdmin

I'm trying to import a spreadsheet with information from a database table, but when I try to import, it gives the following message:    field 'md5' must have a value However, there are values in this field. I do not know what to do about...
asked by 10.12.2017 / 23:18
0
answers

Error giving the Migrate command from laravel to postgres

Expensive, good afternoon. I am not getting the migrate command in laravel for postgres. I changed the settings, I enabled the driver, but nothing works. Any ideas? database.php: 'default' => env('DB_CONNECTION', 'pgsql'), PhpInfo () E...
asked by 12.12.2017 / 19:10
2
answers

Project Laravel works in mysql but the error in the migration when using postgres

I have a project that I started in mysql, I created some migration and I put relationships inside them, whenever I needed to make changes, delete the database and run the migrate again, with mysql always worked. I need to change the database f...
asked by 17.11.2017 / 20:37
0
answers

Is it possible to encrypt the password for connecting to the database that is inside a Java application?

I'm using a Java application and using the PostgreSQL database. To make the connection to the bank I use this method: public static Connection getConnection() throws Exception { try { Class.forName("org.postgresql.Drive...
asked by 08.11.2017 / 18:47
1
answer

How to sort by results more similar to the last parameter?

I have a table in my system that saves all airports and in a select autocomplete I have this list where I can search. The problem is that I can search for " nome ", " cidade ", " país " and " IATA " and requir...
asked by 03.10.2017 / 20:19
2
answers

Use timestamp with or without timezone in postgresql?

Use timestamp with or without timezone in Postgres? The Web application will be used in different countries, so I will have to deal with different time zones. The system has data entry of several different objects that have the day and time t...
asked by 24.08.2017 / 20:54
0
answers

How to group 2 selects into one by differentiating them

I have a situation here I have two selects results that are ok but I would like to change the result to one of the selects. select sum (r.l.numero_exames_relacionados), estabelecimento_saude.nome_fantasia from r.l. left join r.e. on r.l.identi...
asked by 13.09.2017 / 20:29
1
answer

Problems restoring a database in PostgreSQL with C #

private void btnRestore_Click(object sender, EventArgs e) { if (clsB.ConectaBanco()) { //Executo a seguinte função para limpar a base de dados, para poder dar o restore. clsB.ExecutarSQL("drop schema public cascade; create...
asked by 14.09.2017 / 19:44