Most voted "postgresql" questions
Postgresql is an open-source, object-relational database management system (ORDBMS) available for many platforms, including Linux, UNIX, MS Windows, and macOS. Please mention your version of Postgresql when asking questions.
Learn more…1,437 questions
Sort by count of
-
1
votes1
answer206
viewsHow to check if a table date is lower than today in Doctrine - Postgresql
I have to check if the user has registered an expiration date, if yes, I check if that date is lower than today if it is, it shows if it does not hide, I did so: $this->noticia =…
-
1
votes2
answers317
viewsPersist JSON Postgres / Golang
Hello, is there any way to persist a JSON in postgres with the GO language? I don’t want to do a manual Insert, I want to map my JSON with a struct and persist, similar to Hibernate in Java. found…
-
1
votes1
answer9247
viewsHow to access Postgresql consoles?
I bought it recently that book and have followed the guidelines on how to install Postgresql for the Windows operating system: I can make all possible changes to the interactive environment, but I…
-
1
votes1
answer587
viewsJSF agenda with datatable containing data from different lists
I am making a software in JSF (2.2), primefaces and JPA with the Postgres bank. I need to make a schedule of accounts to pay with the following columns and their data: Column before yesterday with…
-
1
votes1
answer178
viewsC# + Postgresql = strange character
Greetings Galera I am working with C# Windows Forms and have already done some tests with postgresql using version 9.1 and everything seemingly normal. But I came across a bench in version 8.4,…
-
1
votes2
answers318
viewsDAO + Webservice
I want to use the DAO standard to create a Java project in Eclipse to view data from a database. Only I want to turn it into a Webservice.. How should I proceed? Just use that IDE Webservice…
-
1
votes0
answers89
viewsLaravel 5 whereRaw returns error but the final query is executed correctly in postgres
You are returning the following error when running my query using whereRaw: SQLSTATE[42P18]: Indeterminate datatype: 7 ERROR: could not determine data type of Parameter $2. The code snippet…
-
1
votes4
answers3646
viewsCapture selected value in grid checkbox
Hello, I have the form above where it shows all the products I have registered in my database and presents in a Gride. I put inside this Gride the option to select (checkbox). I would like you to…
-
1
votes1
answer128
viewsData - date_trunc for PHP
Postgresql has a date function called date_trunc How can I play it in PHP? I only need the options: cond minute hour day week Month Quarter year…
-
1
votes1
answer1106
viewsHow to return the records of the last 7 days counting the current day with postgresql?
I’m doing a database search where I want to return the records from the last seven days. I made an SQL script that returns the records of the last 7 days but it does not count the current day as the…
postgresqlasked 9 years ago Gabriel Schmidt Cordeiro 728 -
1
votes2
answers4594
viewsDelete string-specific word
Good evening, everyone. I have a problem which is this:: I need to remove the tag '<br>' at the end of the data in my database (Postgresql), due to the text editor that puts automatically. I…
-
1
votes1
answer116
viewsEF6 and NPGSQL : Foreign key breach error
Good afternoon ! I’m new to ASP.NET and EF6. I used to develop in PHP. I created a project (ASP.NET MVC) using EF6 and NPGSQL. I got a little bit when creating relationships between two tables but…
-
1
votes1
answer298
viewsCount in Postgresql using OVER
I have a teacher evaluation table and another with student evaluations: tbl_teacher id | nome ---------------------------- 1 | José 2 | Maria 3 | Paulo tbl_evaluation id | idprofessor | avaliacao |…
-
1
votes1
answer165
viewsError when viewing postgres table using Jpa, Hibernate and Postgres
I did a small project to test a small registration in a postgres table , using jpa, with Hibernate, I managed to make the registration class work, it inserts in the table without problems but I…
-
1
votes0
answers496
viewsSubtraction return on postgres
I have a table with a field called VALUE double Precision, and a function that returns another data also double Precision, what happens is that if I do select (VALUE - function()) the results in…
postgresqlasked 8 years, 11 months ago Felipe Sachetti 155 -
1
votes1
answer416
viewschange field type of all tables
there is some way to go through the tables of a database, changing all columns of a certain type? type used now DOUBLE PRECISION desired type NUMERIC
postgresqlasked 8 years, 11 months ago Felipe Sachetti 155 -
1
votes0
answers242
viewshow to insert into the sql Where Insert postgres
I am entering data in a table in postgres, it happens that I have a fields that do not exist in the referenced table and then the error when trying to insert a record that does not exist. I need to…
postgresqlasked 8 years, 11 months ago usersantos 765 -
1
votes1
answer316
viewsError doing INSERT - Laravel 5.1 + Postgresql
I have date fields in my form, but these fields are optional. When I fill in a date the registration is successfully performed, but if I leave the date field empty I get the following error:…
-
1
votes2
answers90
viewspostgres sql Insert into
I have to copy data from two databases to a new one, it happens that when copied new data these already exist but there are new ones that are not inserted. The query I have at the moment is this:…
postgresqlasked 8 years, 10 months ago usersantos 765 -
1
votes1
answer43
viewsProblem loading only required fields using Resultsettransformer in Hibernate
I’m trying to develop a method for through a SQL pure, seek only the fields necessary to mine query and finally, already bring the already mapped object. In this case the object would be…
-
1
votes1
answer81
viewsHow do I know the current connection the system is using in Cakephp 3.0?
Hello, I am working with two types of connections in databases with different settings. I want to know how I can get the current connection that the page is running dynamically. Currently I use…
-
1
votes1
answer415
viewsHow to see the disk space that the index occupies in the database?
I have the table maintenance with the column id_product (varchar(MAX)), however the same is not the primary key, the table has 900 thousand records so I decided to create indices to optimize…
-
1
votes1
answer222
viewsUlitization IS DISTINCT FROM - Postgres
What is the best use of this function in Postgres IS DISTINCT FROM, doing tests obtained the same result using COALESCE but in less time, follows the test: SELECT COUNT(P.id) FROM produto P INNER…
-
1
votes1
answer465
viewsExtracting postgresql data to file
I am trying to extract data from a table to a file with the following command: COPY historico TO '/home/jessica/teste.txt'; But the following error occurs: ERROR: could not open file…
-
1
votes3
answers4717
viewsI can’t connect with postgresql in php
I’m trying to make a PHP Login system using Postgresql but I can’t get my application to connect to the database. follows the code: <?php $connect = pg_connect("dbname=testebd"); //Banco de dados…
-
1
votes1
answer376
viewsHow to convert certain group of columns to JSON?
I have the following problem: I have a table with N columns, however, I would like to turn almost all of them into a single json column, e.g.: id, json(col2,col3,col4) as dados I looked at the…
-
1
votes1
answer50
viewsJava - Class does not display requested information
Good morning, I need to fix a problem when I ask in "dao. Access" the get of the model class.User returns vázio = null. When it is called: doLogin(model.Access access) you see the information by…
-
1
votes1
answer664
viewsQuery to return recurrence values, which have not yet been created in the database
I need to make a query in the database where the records are not yet saved. I will explain better: In a system that I am developing, the user can register a recurring expense, that is, it will be…
-
1
votes2
answers371
viewsDifficulty Mounting SQL Query with UNION with SUM
I have 2 tables that stores type of different sales, and I need to add everything to get the amount to generate the charge, however I am not able to mount the sql query, follows: SELECT…
-
1
votes2
answers6979
viewsHow do I put autoincrement
In the bank I can only enter if I add a code, but I want to be auto increment, in the bank I use postgre and declared the code as serial String sql = "INSERT INTO tbl_cliente(codigo,nome, cpf,…
postgresqlasked 8 years, 5 months ago Diego Noceli 65 -
1
votes2
answers245
viewsData Display Issues Laravel 5.1
I’m a beginner in Laravel and I’m trying to bring data from a BD with multiple Postgresql schemas with Laravel 5.1 and is bringing me an error What configuration should be done for the model to…
-
1
votes1
answer335
viewsPostgresql many processes
I have Postgresql installed in a machine where runs a system, and throughout the day there are several processes with postgres.exe and consumes machine resources. At times it has more than 100…
-
1
votes2
answers6734
viewsChange column type of Postegresql Database
I need to change the column type of a table I’m using the following code: ALTER TABLE cadastro_remetente ALTER COLUMN ssl_smtp DROP DEFAULT; ALTER TABLE cadastro_remetente ALTER COLUMN ssl_smtp SET…
postgresqlasked 8 years, 10 months ago HimorriveL 143 -
1
votes0
answers51
viewsWindows servers load balancing postgres
I’m wondering a little bit more about load balancing at Postgres and a little failover. I saw on several sites including Postgres that there is a program called pgpool i e ii, this program makes the…
-
1
votes1
answer59
viewsHow to count underage employees?
I use the code below to display the number of active employees: {{ $relatorio->Empresa->Funcionario->where('id_status', 1)->count() }} How do I count only employees under the age of 18?…
-
1
votes0
answers199
viewsNpgsql - Entity Framework 6 Problem
I am finding problems to use Postgresql together with Entity Framework 6. When trying to fetch data from my repository I get the following message: The context cannot be used while the model is…
-
1
votes1
answer119
viewsSELECT in postgresql does not take records in the time range
I have the following SELECT SELECT * FROM motoqueiros WHERE now() - INTERVAL '8 SECONDS' <= data_update It works on my local machine. I created a server on AMAZON, the server has Ubuntu 14 64…
postgresqlasked 8 years, 3 months ago Rubens Ventura 301 -
1
votes2
answers526
viewsPython 3.5 + Django + Postgresql on Windows
I am currently starting a web system project using Python 3.5 and the Django 1.9.1 framework, aiming to integrate them with a database Postgresql 9.5, all installed on a Windows 10 x64 OS machine.…
-
1
votes0
answers111
viewsPlay Framework JPA postgres
Hello, I’m learning to work with Play! framework and I am having difficulty integrating my application with the Postgres bank, using Hibernate. The application does not use persistence, the bank is…
-
1
votes1
answer1888
viewsProblem with postgres database connection in php
I’m making a connection to bank postgres but there’s been an error I can’t determine, following the codes: Config.php: define('DB','sistema_postgres'); define('HOST','localhost');…
-
1
votes0
answers56
viewspython relationship in neo4j
I have the following code where I am migrating a relational database to neo4j. I made a node for each latitude and longitude sensor and a distinct node for each rainfall recorded in my database. db…
-
1
votes1
answer45
viewsSelect accessing two tables
I have a Product table, with the fields Marker, model and type. A second table referring to laptops has its fields related to price, RAM, other fields and the model, which is the same as the Product…
-
1
votes1
answer69
viewsError when bringing information from database
I’m having trouble bringing the information from the database and displaying it in a list, when executing the code to bring the information from the application BD to and the following error…
-
1
votes2
answers328
viewsSearch and display in a listview a single type of BD information
I’m having problems to search for a single type of BD information, I’ve created a list where I bring all the information in it present, but I want to pull only one, for example search only the names…
-
1
votes1
answer201
viewsHow to measure the amount of disk space required for an ALTER TABLE operation?
I need to make some changes to one of the tables to add new columns. The problem is that I cannot do it. I get the following error: PG::Diskfull: ERROR: could not extend file…
-
1
votes1
answer657
viewsCreate Postgres "Numeric" Field in Laravel 5.1
I need to create a field like Numeric existing in postgres using migrations from the Laravel, can anyone tell me how I do? I tried that, but it didn’t roll: public function up() {…
-
1
votes0
answers69
viewsNew fields added after scaffold do not persist in the bank even though they are in Strong params
I have a little problem here that I haven’t been able to solve for 3 days. Very strange. It’s in the editing of a record. He’s just updating the first record, not the second. The curious thing is…
-
1
votes0
answers32
viewsHow to use Join in UPDATE?
This is my command: UPDATE address SET lat = :latitude, lng = :longitude WHERE menu_id = :menu Only that menu_id is not from the same table. How can I do?…
-
1
votes1
answer142
viewsHow to join 4 tables in SQL that is returning empty ? (Inner, Outer or left Join )
I have 4 tables with the following relationships: Products has N Variations Sizes has N Variations Colors has N Variations Variations belongs to Products,Sizes and Colors The structure of the tables…
-
1
votes1
answer40
viewsError trying to set Npgsqldataadapter Missingschemaaction property
I’m trying to set the property MissingSchemaAction of an object NpgsqlDataAdapter, but Visual Studio is complaining that the property does not exist. I looked at the github of the project and saw…