Click here to Skip to main content
15,891,431 members
Everything / Database Development / PostgreSQL

PostgreSQL

PostgreSQL

Great Reads

by Evoluteur
Generic REST or GraphQL endpoints for CRUD and more, written in JavaScript, using Node.js, Express, and PostgreSQL
by RickZeeland
PostgreSQL notifications Windows Forms application
by Arthur V. Ratz
Create a Python web-app using Flask and PostgreSQL server, and run it in Docker
by dsuryd
Combine PostgreSQL logical replication feature with dotNetify to broadcast data changes to your website in real-time

Latest Articles

by GabrieleTronchin
A simple implementation of MartenDB. MartenDB is a .NET Transactional Document DB and Event Store on PostgreSQL. For more information about MartenDB
by Farzad Niknam B
Web app creation using .NET 7.0 and ASP.NET Core
by JBartlau
This article demonstrates how Report Server offers a distribution of reports that save time, increase efficiency, and reduce potential errors.
by Jeffrey T. Fritz
Migrate Azure Postgres database to a Flexible Server

All Articles

Sort by Title

PostgreSQL 

14 May 2020 by RickZeeland
If your table has a SERIAL field it must not be included in the copy statement. See examples here: Import CSV File Into PosgreSQL Table[^]
27 May 2020 by PaulKukiel
.NET Core 3.1, Docker, postgres, swagger quick start
14 Nov 2016 by Vincent Maverick Durano
A quick demo tutorial on how to setup .NET Core on Mac and creating a simple ASP.NET Core app that talks to PostgreSQL database, and running it on Docker.
18 Oct 2020 by JawadHasan
Use NoSQL database functionality from within a Relational database system
15 Jul 2014 by koksu
I'm looking for some database provider for PostgreSQL that is based on libpq.dll. I alreade tried a Npgsql but it not use libpq.dll. I made also a research but there is nothing I could google. Do you know any ideas?Or mybe the only solution is to write my own wrapper for libpq.dll?I have...
22 Sep 2020 by Lix Felix
I need to input 1 GB data every 15 minutes if looping my insert statement it will take around 20 minutes its take to long I need to insert multiple Rows in 1 insert statement looping the values but not the insert statement code Sub...
22 Sep 2020 by Patrice T
kueri = "insert into tblpibconr values" ... kueri = kueri + "('" + dt3.Rows(i)("car").ToString + "','" + dt3.Rows(i)("reskd").ToString + "','" + dt3.Rows(i)("contno").ToString + "','" + dt3.Rows(i)("contukur").ToString.Trim() + "','"...
23 Sep 2020 by Richard Deeming
Try something like this: Using conn As NpgsqlConnection = connNpgsql.OpenConnection() Using cmd As New NpgsqlCommand("", conn) Dim sb As New StringBuilder("insert into tblpibconr(car, reskd, contno, contukur,conttipe) values "); ...
3 Jul 2019 by Cloudster
Deploy a 360 image gallery with Django, Bootstrap, Python, A-Frame, and PostgreSQL
20 Oct 2016 by Bryan Kowalchuk
The two most common database lookup table patterns are examined
24 Mar 2021 by Arctype SQL
Universally Unique IDs (UUIDs) use random numbers to create unique IDs. UUIDs use more storage, but they provide a good solution for distributed databases and security.
15 Oct 2020 by RickZeeland
PostgreSQL notifications Windows Forms application
22 Jun 2015 by Member 11054723
Hello, if my application has .Net C # MVC application and JSP application, how can I PostgresXL database and communication?I saw [libpq - C Library] only on the official website of the library, I want to know is not a .Net C # and JSP-specific communication components can be used?Thanks!
27 Jun 2015 by Member 11054723
Hello, my PostgresXL version 9.2.0(1)After I started the GTM, DataNode, Coordinator, as well as the coordinator of each datanode postgresql.conf archive#default_read_only_transaction = "off" modified default_read_only_transaction = "off"(2)Use the following instructions to...
10 Nov 2015 by dipesh_karmakar
I have php files on my computer and i can very well access those from IIS using eighter localhost or loop-back address . But now if i want to access the same file of php from another computer in the same wifi network what should i do?
2 Feb 2016 by pravinchopade
I have PostgreSQL 9.5 and Visual studio 2010; I'm trying to connect to database through C# application; below is the codestring connstring = "Server=127.0.0.1;Port=5432;User Id=[UserID];Password=[UserPassword];Database=[Database];";NpgsqlConnection conn = new...
2 Feb 2016 by StM0n
Like described in our conversation ;)Download the approprioate version via nuget and reference it. in your case, it's 2.2.7 which provides a version for .net3.5Glad I could help
1 Mar 2015 by Black_Rose
Hi allI have a table which contains around 7000+ data.now i want to add a unique id column on the existing data and also later if user addsany records, it should increment automatically.e.g. Below is the existing data1 name 541 name 502 age 883 place...
1 Mar 2015 by Maciej Los
You did not provide enough information about your issue. So, i assume that the most difficult to you is to create custom autogenerated sequence, for example: 00001.Follow these steps: http://www.sqlteam.com/article/custom-auto-generated-sequences-with-sql-server[^]
21 Feb 2014 by Snehasish_Nandy
Hi allI am printing in a text file string per = dt.Rows[i][2].ToString(); int l = per.Length; string len1 = per.Substring(0, 16); string len2 = per.Substring(16);this is my 2 strings.problem is if the string "per" is less then 16 e.g. 12,it's showing error.So...
21 Feb 2014 by Rock (Multithreaded)
Please check this out... string per = dt.Rows[i][2].ToString(); if (per.Length >= 16) { string len1 = per.Substring(0, 16); Console.Write("len1: " + len1); } else ...
21 Feb 2014 by CHill60
Well if you really want to add spaces to make up the length then you could do this ...// method 1 - pad right with spaces firstper = per.PadRight(16);// using TrimEnd in the next line effectively implements your requirement "if it's more than 16 then nothing"len1 = per.Substring(0,...
9 Mar 2011 by Vincent Beek
For a new to develop desktop application we have to make some choices.I wonder if Entity Framework is the way to go.Please share your vision on this with me.Some background info:New windows app supporting MySQL or PostgreSQL. C#, 4.0, WPF.Database I estimate will be 20-30 tables...
9 Mar 2011 by Amit Kumar Tiwari
Entity framework is the best thing to work with. It is very powerful in itself, following RDBMS and taking care of cardinalities, constraints and validations. It generates entity classes and everything you need for getting started with DB development.Best part is using the Entity framework...
9 Apr 2021 by Arctype SQL
Explanation of how a query gets execution and understanding the EXPLAIN command
7 Apr 2024 by Office Systems
'm getting this error java.lang.IllegalStateException: Calling [asyncPostProcess()] is not valid for a request with Async state [ERROR] in an API gateway when I'm executing order-service which uploads more than 700,000 records fetched from an API...
31 Jul 2016 by cas tools
Hi friends,I have saved an image in my postgres database.when i want to retrieve the image back in the picture box i am getting this error ArgumentException was unhandled Parameter not valid. i have pasted my codings.What I have tried:I have tried all sorts of solutions from...
31 Jul 2016 by OriginalGriff
Simple: it's probably how you saved it that is causing the problem: Why do I get a "Parameter is not valid." exception when I read an image from my database?[^]
31 Jul 2016 by RickZeeland
Something like this:command = new NpgsqlCommand("select customerimage from mytable where id = 1);", conn);Byte[] result = (Byte[])command.ExecuteScalar();FileStream fs = new FileStream("database", FileMode.Create, FileAccess.Write);BinaryWriter bw = new BinaryWriter(new...
29 Aug 2018 by Vincent Maverick Durano
A quick walk-through on building an ASP.NET Core 2.0 application on MAC and running it on Docker container
16 Jul 2023 by Naresh Barule
We have an RDS instance hosted for Aurora PostgreSQL, specifically using the 'db.r5.xlarge' instance type. When we initially set up the RDS instance, a default user named 'rdsadmin' was automatically created with the 'SUPERUSER' role. During the...
21 Dec 2016 by User-11630313
how to implement audit trail concept for web application?..i am using 3 tier architecture...
21 Dec 2016 by Member 10062432
Audit Trail is recording the information(e.g.login,logout,(insert,delete,update w.r.t. change in system.)) only in the event of changes made w.r.t data.Also refer to the below answered FAQ What does an audit trail require to track?A: The text of the regulation states the audit trail...
15 Sep 2012 by mparvez
Generate auto backup for PostgreSQL
4 Jul 2022 by DiponRoy
How to auto increment column options in databases
10 Oct 2013 by vinesh mashetty
hi everyone,im new to postgresql.I want to backup my database automatically everyday.my operating system is windows7.can anyone helps me.thanks in advance.
10 Oct 2013 by Mehdi Gholam
Read the following : http://wiki.postgresql.org/wiki/Automated_Backup_on_Windows[^]
3 Feb 2023 by JBartlau
This article demonstrates how Report Server offers a distribution of reports that save time, increase efficiency, and reduce potential errors.
21 Sep 2011 by shanboy
hi alli have fields date_lastupdate,peiodicity(data type is interval),due_date.What i'm trying to do iswhen the date_lastupdate changes ,periodicity(which may be different for each row),due_date field gets updated by following formuladue_date=date_lastupdate+periodicitywhen i queried...
18 Sep 2011 by Prerak Patel
Try thisselect areaName,due_date from updation where due_date=date_lastupdate+periodicityWhy do you use due_date=due_date+periodicity?
21 Sep 2011 by André Kraak
If you are trying change the due_date field you should be using an update[^] statement.
27 Apr 2017 by Darren G441
An effective solution for backing up a schema worth of tables on a Window installation of PostgreSQL database
25 Nov 2014 by Member 10256268
sWhereForCount := trim(sWhereForCount,' ');IF(sWhereForCount != '') THEN iLength := length(sWhereForCount) - 2; subSQL_WherForCount := substr(sWhereForCount, iLength, 3); IF(subSQL_WherForCount = 'AND') THEN sWhereForCount := substr(sWhereForCount, 0,...
26 Oct 2015 by Andrew Budiman
hi everybody here,i wanna ask about a big data using postgresql and using EJB(jboss) as the remote bean, also as the webserver i'm using tomcat and pure html+jsp(JSON).let's say in a month i'm gonna have 10000 rows of data, so if i'm query it for 1 day, it gotcha be 100 rows, and it's...
23 Nov 2022 by Eva Smirnova
import uuid from django.db import models from django.core import validators from django.contrib.auth.models import User from django.db.models.base import Model from django.db.models.deletion import SET, SET_NULL from...
23 Nov 2022 by Richard MacCutchan
The message is telling you that the database could not find a Book record with a pk of 1. Check the contents of the database tables to see exactly what it does have.
3 Jan 2018 by Member 13605994
Boost.Asio or Libuv, which is better for large-scale Linux Servers for enterprise?(by c++) The database will be PostgreSQL. And the client should be app on iPhone and Android. ps. Is golang very popular and effecient right now for Server developing? will golang work good with PostgreSQL and...
3 Jan 2018 by CPallini
See, for instance: c++ - How does libuv compare to Boost/ASIO? - Stack Overflow[^].
27 May 2018 by Ozesh Thapa
A PostgreSQL handler for C# developers for Rapid Development
17 Dec 2012 by Zsombi55
Connection is with npgsql, to PostgreSQL 9.2.Currency value is taken in as string from a TextBox, which is then converted to Decimal, with formatting to have/allow decimal delimiter and group pointer for thousands.The SQL table variable is of type numeric.This is where I get the string...
17 Dec 2012 by Christian Graus
The database stores the number if you use a numeric type. Thus, it has a value and no rendering details. The format you see, will always be the default or the one you ask for. The value stored does not change.
2 Feb 2014 by Snehasish_Nandy
Hi allI am working in a c# windows application with postgreSql.and it's running in 4 location.Problem is this : In 3 locations it's working fine but in the 4th location application responding slowly.records in database are far more in each 3 locations compare to the 4th one.Please...
2 Feb 2014 by CoderPanda
Kinda hard to answer. I am trying to suggest some pointers. I hope it helps...If I understood correctly then you have the same .net code hosted at 4 locations and so is the DB. Now 3 out of 4 instances are fine. So the 4th one being slow is very unlikely to be caused by the .net...
27 Aug 2015 by J Tackkett
Using .Net Framework 4.5, Entity Framework 6.0.0.0, and NPGSQL, I am trying to update the model from the database and use a stored procedure that returns a table result from a PostgeSQL stored procedure (function).I am getting an error for each column that comes from the stored procedure...
31 Mar 2024 by GabrieleTronchin
A simple implementation of MartenDB. MartenDB is a .NET Transactional Document DB and Event Store on PostgreSQL. For more information about MartenDB
20 Apr 2019 by BrainlessLabs.com, sibani.p
Creating a simple ORM for C++ on-top of SQL database
26 Jul 2015 by User-11630313
i am new to postgres..in my database sequence maxvalue is 50 and i want reset the sequence after reach maxvalue how it is?thankyou....
13 Aug 2014 by Member 10891595
can anyone tell me the exact query of the following query in postgres databasethis query is written in mysql databaseSELECT OnCName FROM user_name_cno HAVING INSTR('gaz`iabad',OnCName)>0 AND REPLACE(SUBSTRING('gaz`iabad',...
3 Sep 2015 by Priyanka Tiwari001
Dear all,I am a newbie to PostgreSQL. I want to return multiple tables using function in PostgreSQL just like writing multiple select statement in MSSQL stored procedure.Can anyone suggest me how to do it please?Thank u to all...
3 Sep 2015 by Suvendu Shekhar Giri
This is not purely supported by PostgreSQL (as far as I know), you can get results combined if they return the same row type. You can do that either through a UNION ALL or a function like following-CREATE FUNCTION test() RETURNS SETOF first_table AS$func$BEGINRETURN QUERYSELECT *...
13 Jun 2020 by tolgasenol
There are two ComboBoxes "jComboCins1 and jComboCinsM". I want to populate jComboCinsM depending on jComboCins1 from postgresql. Here is the code, no errors but still cannot populate. Thanks in advance for all replies. public class...
13 May 2017 by Member 12419363
I am using nodejs + postgreSQL to do the registration of my app, so i have this basic model: "use strict"; var sequelize = require('./index'); var bcrypt = require('bcryptjs'); module.exports = function (sequelize, DataTypes) { var User = sequelize.define("User", { ...
16 Jan 2012 by Amund Gjersøe
I've used the ODBC driver when generating DataSets in Visual Studio 2010 multiple times, but this time it all went wrong. The table in the DB has a set of columns defined as numeric(7,2). I try to insert data through the autogenerated Insert method like this:int x =...
16 Jan 2012 by Amund Gjersøe
Lol, things work in mysterious ways!It turns out that to get the Postgres ODBC driver to work properly I had to read from the table before inserting data into it. In all other applications I did read from the DB as well as write. In my current application I only write, and that was the...
31 Oct 2015 by Blake Peeling
Hey guys, I am running into an issue when I try to set up a domain with a CHECK constraint that has a subquery in it. I am aware that apparently PostgreSQL does NOT support subqueries in CHECK clauses, as I got the error when trying to run the query. But I am trying to figure out if there is...
30 Apr 2022 by Member 13937944
Hello, I have created an exercise on which one column has words and the second column has the pronounce. The second column is shuffled. The code which shows the results is: while($row = pg_fetch_array($ideo_results)){ $pinyin_query = "select...
30 Apr 2022 by Member 13937944
I had to change two lines: var getIdeo = $('input[name="ideogram"]:checked').val(); var getPin = $('input[name="pinnin"]:checked').val();
17 Mar 2016 by KanwalT
want to connect postgres databaseany help ?thanking in an anticipationWhat I have tried:naeem@naeem-Inspiron-5520:/var/www/html/eSecretarial$ sudo -u postgres psqlsudo: /var/lib/sudo writable by non-owner (040775), should be mode 0700[sudo] password for naeem:psql: FATAL: ...
17 Mar 2016 by Jochen Arndt
You have two problems that are not related to PostgreSQL.sudo: /var/lib/sudo writable by non-owner (040775), should be mode 0700The permissions of /var/lib/sudo (or even whole upper directory trees) has been changed. These must be restored. If they has been changed for /var/lib or even...
29 Dec 2011 by jasmin_patel
HiI have one application which use the database of Microsoft SQL server 2005 Express Edition and database size now become more then 4GB.So SQL Server not support More then 4GB database now,,,I want to Change my DATABASE from SQL Server2005 to PostgreSQL.So what steps can i follow...
29 Dec 2011 by Wendelius
One way to transfer data from SQL Server to Postgres is to cinfigure a linked server between the databases and use that to insert data from SQL Server to Postgre. More info, see: http://msdn.microsoft.com/en-us/library/ms188279.aspx[^]Another thing is that SQL Server 2008 Express has a size...
29 Dec 2011 by Rajesh Anuhya
go through this link, this may helps youHere[^]
2 Jan 2016 by RickZeeland
This console application converts an SQL Server database to PostgreSQL.
8 Feb 2015 by Black_Rose
Hi allI have 2 database in my system PostgreSQL ver 9.11)EssaePOS2)TouchPOSI want to copy all the data from EssaePOS one table to TouchPOS another table.the table name and number of column is same for both the database.I searched google.got something called pg_dump but not...
4 Feb 2015 by /\jmot
trySELECT * INTO TouchPOS FROM EssaePOSref.http://www.postgresql.org/docs/9.1/static/sql-selectinto.html[^]if you want to copy a specific column set then into in not applicable.see...
19 Nov 2015 by Member 12153818
I am trying to develop a log in web application that can be accessed by multiple clients. So far I have made a simple log in page, using a template in python tools for visual studio, in visual studio 2013. The log in function works, getting data from a dqlite3 database. I have created a...
30 Sep 2013 by hansoctantan
Hello everyone, Is there a code where I can create a database n postgresql programmatically using java. I'm creating a web application and I'm using Eclipse IDE.Thanks
30 Sep 2013 by Richard MacCutchan
See http://docs.oracle.com/javase/tutorial/jdbc/index.html[^].
23 Feb 2014 by Snehasish_Nandy
Hi allIn my application i want to create a worklog file which will keep track of all the operations happening at the software in daily basis.Please give me some idea how to do that.
23 Feb 2014 by Abhinav S
If you want a logging utility that tracks code errors, warnings etc, use log4Net - log4net Tutorial[^].There are, of course, other tools available as well.
30 Sep 2015 by pradeeplutare
requirement :1. Create Dynamic Controls from Database (Db has all Info) Even controls must be populate with all values.2. Don't want to postback and remove page load.3. wants to Use some service and return type I am expecting as Controls with all values (means if it is drop down It should...
30 Sep 2015 by pradeeplutare
All Kind of ASP.Net .like drop down ,text box,Radio Button etc..and all information I have stored in Database so On Run time I have to find particular controls on specific page...all things are mapped in Database ...I need to display these controls on page without connecting multiple times...
22 Aug 2018 by Member 13958025
Hi Developers, I am creating asp.net core 2.1 project with postgresql. I need to create new 4 tables everytime when user register on my Website (it means when new row inserted in User table,new 4 tables created automatically). I search a lot,but not find any way to solve this using entity...
9 Jan 2012 by lassebunk
How to create a location aware website using Ruby on Rails, PostgreSQL, and PostGIS
23 Jan 2012 by Ahn_7
Hi All, I'm a beginner in PostgreSQl and I have some doubts regarding "using scripts in PosrgreSQL"..I'm using visual studio as my GUI coding part concern and from there I'm accessing the PostgreSQL commands..But now I need to create databases, tables etc.. through scripts..Give me...
23 Jan 2012 by Kishanthakur
hi .. click database >right click > choose script database as > choose create to >new query window.............and select option that you want .hope u like it...
5 Sep 2014 by Erik Vullings
Converting a PostGIS table to GeoJSON
16 Oct 2014 by Member 11158130
I have tried to calculate cumulative sum column to find out Present Working Employees in each month, but am getting NULL instead of present employee as per previous month.Table employees: id date_started date_terminated 1 01-Apr-14 NULL 2 21-Apr-14 ...
16 Oct 2014 by Shweta N Mishra
Hi,You could use the self join on the employees table after grouping up all the employess by date .something like belowselect date_started,COUNT(1) NumberOfEmployeejoinedInto #table2from employeesGroup by date_startedselect e1.date_started,SUM(E2.NumberOfEmployeejoined)from...
20 Mar 2012 by tmchedlishvili
hello if you can help me or advise me somethingi have table named droducts; insert into products values('a1',45,'ds','C:\Documents and Settings\AdministratorDesktop\1454251_5.jpg');and i want to see my datas in my datagridviewer1 but there is errot it shows evry row except image and...
20 Mar 2012 by Wayne Gaylard
Well, you are saving the image path to the database and not the image itself. When the data comes back from the database to fill the adapter, it is just a string with the path, and has no idea that it is supposed to be an image.
20 Mar 2012 by tmchedlishvili
aha it is clear... but what do i can in order to do this? i want image in my datagrid... which will be in my database...:(
29 Jan 2024 by Nicholas Lombardi
I have a form where I expect many blank input text boxes (standard html) I need to insert records, with the INSERT statement ignoring those fields which do not have input values. For context, I take the POST variables in the usual way: if...
29 Jan 2024 by Peter_in_2780
Your array_fill() is the culprit. Take a look at what you are putting after VALUES ( implode(',',array_fill(0,count($col),implode(',', $input))) It's effectively evaluated right to left because of the nested function calls, so take the first...
8 May 2013 by Runner55Code
I would normally declare a variable in the following manner...DECLARE @myVariable TextSET @myVariable = 'pages'SELECT @myVariableFROM coredataHow would this change in PostgreSQL (...pgAdmin III) query?