Re: Major release of advanced PostgreSQL driver written in C++

2022-04-12 Thread Dmitry Igrishin
вт, 12 апр. 2022 г. в 13:59, Dominique Devienne : > > On Tue, Apr 12, 2022 at 12:17 PM Dmitry Igrishin wrote: > > I'm excited to announce Pgfe 2.0.0, an advanced and feature rich > > PostgreSQL driver written in C++. > > Congrats on the release. I've been following your

Major release of advanced PostgreSQL driver written in C++

2022-04-12 Thread Dmitry Igrishin
Hello, I'm excited to announce Pgfe 2.0.0, an advanced and feature rich PostgreSQL driver written in C++. Features: - fast and robust; - can be used as either header-only, static or shared library; - works with database connections in both blocking and non-blocking IO manner; - supports

Re: How to write such a query?

2022-01-06 Thread Dmitry Igrishin
On Thu, Jan 6, 2022, 09:40 Igor Korot wrote: > Hi, ALL, > In SQLite you can write: > > SELECT a, b, c FROM foo WHERE id = :id; > > where ":id" is the named parameter. > > The query above is similar to > > SELECT a,b,c FROM foo WHERE id = ?; > > except that the parameter has a name. > > Is there

Re: LibPQ: Lifetime of PGresult passed in to PQnoticeReceiver callback

2021-12-14 Thread Dmitry Igrishin
пн, 13 дек. 2021 г. в 11:43, Dominique Devienne : > > Hi, > > The doc at > https://www.postgresql.org/docs/current/libpq-notice-processing.html is not > clear to me on whether it should be PQclear'd or not. Who manages the > lifetime of that PGresult? libpq. That PGresult cleared by libpq right

Re: develop a extension with cpp?

2021-11-02 Thread Dmitry Igrishin
вт, 2 нояб. 2021 г. в 20:12, huangning...@yahoo.com : > > Hi > if i can develop a extension with cpp language? Sure, you can. Please, see example -- https://github.com/dmitigr/pgnso

Re: Question about how to handle numeric (decimal) data types while using libpq

2021-07-06 Thread Dmitry Igrishin
On Tue, Jul 6, 2021, 14:04 Sudheer H R wrote: > Hello, > > I am trying to use libpq for interfacing with PostgreSQL from a C/C++ > based application. > > I have tried to use binary format of data for both sending and receiving > data to and from server (resultFormat = 1). > > As I understand

Re: Which is the setup with lowest resources you know Postgres is used in?

2020-10-07 Thread Dmitry Igrishin
чт, 8 окт. 2020 г. в 00:14, raf : > > On Wed, Oct 07, 2020 at 01:53:44PM +0300, Dmitry Igrishin > wrote: > > > In many cases concurrency is not a problem and in fact SQLite may > > handle concurrent requests faster than Postgres. Since SQLite is > > server-le

Re: Which is the setup with lowest resources you know Postgres is used in?

2020-10-07 Thread Dmitry Igrishin
ср, 7 окт. 2020 г. в 10:51, Thorsten Schöning : > > Hi all, > > I'm regularly reading that Postgres is often used with containers and > in cloud environments these days, even on some not too powerful NAS. > > What are the lowest resource setups you know of or even host Postgres > successfully with

Practical usage of large objects.

2020-05-13 Thread Dmitry Igrishin
Hello all, As you know, PostgreSQL has a large objects facility [1]. I'm curious are there real systems which are use this feature? I'm asking because and I'm in doubt should the Pgfe driver [2] provide the convenient API for working with large objects or not. Thanks! [1]

Re: PostgreSQL 13: native JavaScript Procedural Language support ?

2020-03-26 Thread Dmitry Igrishin
чт, 26 мар. 2020 г. в 10:08, Ivan E. Panchenko : > > > On 26.03.2020 03:50, Bruce Momjian wrote: > > On Wed, Mar 25, 2020 at 05:46:27PM +0200, Marius Andreiana wrote: > >> Thanks Tom, that makes sense. Appreciate your time to explain the context. > >> > >> I'll followup with Heroku. > > Also, I

Re: libpq and escaping array string literals

2020-03-06 Thread Dmitry Igrishin
Hey Ted, libpq has no such a facility. If you're on C++ you may want to use Pgfe library to work with the database arrays easy. On Fri, 6 Mar 2020, 22:11 Ted Toth, wrote: > I've got so C code that interacting with a table containing a field of > type text[]. Strings I've got to put in the

Re: Natural sort order extension.

2020-02-12 Thread Dmitry Igrishin
On Wed, 12 Feb 2020, 19:55 Laurenz Albe, wrote: > On Wed, 2020-02-12 at 18:45 +0300, Dmitry Igrishin wrote: > > I've implemented a PostgreSQL extension for natural sort order. I.e. > > strings like "z20", "z0004", "z11", "z2" sort

Natural sort order extension.

2020-02-12 Thread Dmitry Igrishin
Hi, I've implemented a PostgreSQL extension for natural sort order. I.e. strings like "z20", "z0004", "z11", "z2" sorted in ascending order as "z2", "z0004", "z11", "z20". Currently it implements the type textnso which is binary-coercible to/from the text type. It's possible to declare table

RPC via WebSockets.

2020-01-17 Thread Dmitry Igrishin
Hello! Who needs to talk to Postgres right from a WEB-browser via WebSockets? For example, conveniently call storable functions/procedures? Yes, i know about PostgREST. But I want to focus on RPC via WebSockets without all these REST or "give me contents of that table by this URL" stuff... I'm

Re: Problem linking to libpq.lib on Windows

2019-02-14 Thread Dmitry Igrishin
чт, 14 февр. 2019 г. в 12:54, Roberto de Figueiredo Ribeiro : > > Hi list, > > > > I’m building a platform on C++ that uses parts of the libpq-fe.h in it. I had > been previously compiling it in linux, and all was fine. Switched to windows, > now during linking it accuses an error, unable to

Re: libpq PQexecParams & value placeholders

2018-12-14 Thread Dmitry Igrishin
пт, 14 дек. 2018 г. в 14:33, Oleg : > > Hi, all. > > Do we really need a numeric value placeholders like $1 in command string? It's a syntax defined at the backend side. (https://www.postgresql.org/docs/current/sql-prepare.html) > Construction of such string for complex non-static queries is very

Re: libpq.dll question

2018-10-01 Thread Dmitry Igrishin
пн, 1 окт. 2018 г. в 11:15, : > > > Hi, > > admitting that windows is quite alien to me... > I have installed a postgresql server on linux and now want to allow windows > clients access through a tcl gui. > Activestate tcl is installed, and when I try to > package require tdbc::postgresql > I get

Re: ORM

2018-09-29 Thread Dmitry Igrishin
сб, 29 сент. 2018 г. в 1:50, marcelo : > > For a new big and convoluted project I (am/was) using Devart´s > LinqConnect as ORM. > But today I experienced some inexplicable "object reference not set to > an instance of an object" exceptions or other more specific to this > libraries. > I would wish

Re: C++ classes as result of selection in postgresql database

2018-09-14 Thread Dmitry Igrishin
пт, 14 сент. 2018 г. в 17:23, Yuriy Rusinov : > > Dear colleagues ! > > I have to calculate road graph from coordinates and save it to postgresql > database. Is it possible to construct my classes using libpqxx API and return > it to client or I need to develop these API on another layer after

Re: very slow largeobject transfers through JDBC

2018-08-31 Thread Dmitry Igrishin
пт, 31 авг. 2018 г. в 16:35, Mate Varga : > > Hi, > > we're fetching binary data from pg_largeobject table. The data is not very > large, but we ended up storing it there. If I'm copying the data to a file > from the psql console, then it takes X time (e.g. a second), fetching it > through the

Re: Linker errors while creating a PostgreSQL C extension function.

2018-08-19 Thread Dmitry Igrishin
вс, 19 авг. 2018 г. в 17:54, Tom Lane : > > Dmitry Igrishin writes: > > вс, 19 авг. 2018 г. в 16:20, TalGloz : > >> I'll try it later when I'm home. Is there a reason that you are linking > >> like > >> this > >> $(CXX) -Wl,--no-undefined

Re: Linker errors while creating a PostgreSQL C extension function.

2018-08-19 Thread Dmitry Igrishin
вс, 19 авг. 2018 г. в 16:20, TalGloz : > > I'll try it later when I'm home. Is there a reason that you are linking like > this > > $(CXX) -Wl,--no-undefined -shared -o seal_diff_cpp.so $(LDFLAGS) $(LDLIBS) > seal_diff_cpp.o > > And not like this? > > $(CXX) -Wl,--no-undefined -shared -o

Re: Linker errors while creating a PostgreSQL C extension function.

2018-08-19 Thread Dmitry Igrishin
вс, 19 авг. 2018 г. в 15:59, TalGloz : > > No, they still don't appear there and same errors are shown. Try to refactor your Makefile like this: LDFLAGS=-L$(INCLUDE_SEAL_LIB) LDLIBS=-lseal -lpthread seal_diff_cpp.so: seal_diff_cpp.o $(CXX) -Wl,--no-undefined -shared -o seal_diff_cpp.so

Re: Linker errors while creating a PostgreSQL C extension function.

2018-08-19 Thread Dmitry Igrishin
вс, 19 авг. 2018 г. в 15:46, TalGloz : > > OK, I've changed my line to > LDFLAGS = -L$(INCLUDE_SEAL_LIB) -lseal -lpthread And? Is these flags appeared in the g++ invoking command line? I mean the following: g++ -Wl,--no-undefined -shared -o seal_diff_cpp.so seal_diff_cpp.o -L/usr/pgsql-10/lib

Re: Linker errors while creating a PostgreSQL C extension function.

2018-08-19 Thread Dmitry Igrishin
вс, 19 авг. 2018 г. в 15:07, TalGloz : > > Do you mean this command: > > seal_diff_cpp.so: seal_diff_cpp.o > $(CXX) -Wl,--no-undefined -shared -o seal_diff_cpp.so > seal_diff_cpp.o $(LDFLAGS) > > If yes then the -lseal is added with the $(LDFLAGS) at the end of the > command. You've

Re: Linker errors while creating a PostgreSQL C extension function.

2018-08-19 Thread Dmitry Igrishin
вс, 19 авг. 2018 г. в 13:56, TalGloz : > > Hello, > > *I have this code for my C extension function. > * > > xtern "C" { // C Headers must be inside exter "C" { } block. > #include > #include > #include > #include > #include > #include > #include > #include > > PG_MODULE_MAGIC; > } > > //

Re: vPgSql

2018-08-17 Thread Dmitry Igrishin
пт, 17 авг. 2018 г. в 21:19, Joshua D. Drake : > > On 08/17/2018 05:45 AM, Dmitry Igrishin wrote: > > Hey Vlad > > пт, 17 авг. 2018 г. в 15:31, Vlad Alexeenkov : > >> Maybe will be useful for someone > >> > >> Very simple Postgres SQL client vPgSql

Re: vPgSql

2018-08-17 Thread Dmitry Igrishin
Hey Vlad пт, 17 авг. 2018 г. в 15:31, Vlad Alexeenkov : > > Maybe will be useful for someone > > Very simple Postgres SQL client vPgSql: > > https://vsdev.ru Looking nice! Thank you. But I unable to start it on Ubuntu, because there is no bash(1) in /usr/bin. Also, it is open source?

Re: Add column with If Not Exists

2018-08-04 Thread Dmitry Igrishin
сб, 4 авг. 2018 г. в 18:57, Simon White : > > Hi > > I would like to suggest the addition of the "If not exists" to the Add > Column feature of Postgres. There are quite common situations where > ensuring a column exists is important so that an update to remote > devices will not fail but it is

SQL Programming Assistant for PostgreSQL

2018-08-03 Thread Dmitry Igrishin
Hello all, I've released the first version of a simple tool, - pgspa, that can help one to develop in SQL for PostgreSQL. The primary goal is to provide the functional for creating the database objects from the SQL files of arbitrary directory hierarchy without worrying about both the existence

Re: Do we need yet another IDE (SQL development assistant) for PostgreSQL?

2018-07-16 Thread Dmitry Igrishin
пн, 16 июл. 2018 г. в 16:00, Pavel Stehule : > > > 2018-07-16 14:28 GMT+02:00 Dmitry Igrishin : > >> >> >> пн, 16 июл. 2018 г. в 15:01, Pavel Stehule : >> >>> >>> >>> 2018-07-16 13:52 GMT+02:00 Dmitry Igrishin : >>> >&g

Re: Do we need yet another IDE (SQL development assistant) for PostgreSQL?

2018-07-16 Thread Dmitry Igrishin
пн, 16 июл. 2018 г. в 15:01, Pavel Stehule : > > > 2018-07-16 13:52 GMT+02:00 Dmitry Igrishin : > >> >> >> пн, 16 июл. 2018 г. в 14:26, : >> >>> We – and the majority of our customers - are mainly focused on Windows. >>> We use pgadmin iii

Re: Do we need yet another IDE (SQL development assistant) for PostgreSQL?

2018-07-16 Thread Dmitry Igrishin
/views/*.sql /triggers/*.sql ... The developer works with files rather than objects retrieved from the database and loaded into the tree view of the GUI (like in pgAdmin and most of other similar tools). Though, the database browser GUI is a useful feature of course, and should be implemented.

Re: Do we need yet another IDE (SQL development assistant) for PostgreSQL?

2018-07-16 Thread Dmitry Igrishin
пн, 16 июл. 2018 г. в 13:41, Tim Clarke : > +1 for not re-inventing the wheel - building on Netbeans or the Eclipse > project would save you heaps of time and effort and provide > cross-platform out of the box. I use Eclipse all the time. > I agree and don't want to waste my time for reinventing

Re: Do we need yet another IDE (SQL development assistant) for PostgreSQL?

2018-07-16 Thread Dmitry Igrishin
пн, 16 июл. 2018 г. в 12:41, Albrecht Dreß : > Am 16.07.18 00:14 schrieb(en) Tim Cross: > >> Thank you for the point. I'm the C++ programmer and I'm author of the > C++ client library for PostgreSQL - Pgfe and I'm going to use it in this > project. But I'm not sure about the cross-platform GUI

Re: Do we need yet another IDE (SQL development assistant) for PostgreSQL?

2018-07-16 Thread Dmitry Igrishin
пн, 16 июл. 2018 г. в 2:15, Christophe Pettus : > > > On Jul 15, 2018, at 16:06, Dmitry Igrishin wrote: > > > > The cross-platform GUI toolkit will be the challenge. > > This is why I've consider GUI for the Windows only. And if I'll not find > an adequate GUI &g

Re: Do we need yet another IDE (SQL development assistant) for PostgreSQL?

2018-07-15 Thread Dmitry Igrishin
пн, 16 июл. 2018 г. в 1:14, Tim Cross : > > Dmitry Igrishin writes: > > > вс, 15 июл. 2018 г. в 22:42, Chuck Davis : > > > >> If you decide to proceed on this project there's no need to reinvent the > >> wheel. > >> > >> I use N

Re: Do we need yet another IDE (SQL development assistant) for PostgreSQL?

2018-07-15 Thread Dmitry Igrishin
вс, 15 июл. 2018 г. в 23:51, Ravi Krishna : > 1. dbeaver covers many DBMS and even nosql. Many shops are not one > product specific. That is definitely a plus. > On the other hand it is hard to support unique features of PostgreSQL in a tool that attempts to cover all the world. I can't say

Re: Do we need yet another IDE (SQL development assistant) for PostgreSQL?

2018-07-15 Thread Dmitry Igrishin
вс, 15 июл. 2018 г. в 23:05, Ravi Krishna : > What would this new IDE offer which a product like dbeaver does not have. > AFAIK, DBeaver: - covers many DBMS (I want to focus on PostgreSQL); - full fledged IDE with feature rich editor (I want a lightweight tool that can be used from

Re: Do we need yet another IDE (SQL development assistant) for PostgreSQL?

2018-07-15 Thread Dmitry Igrishin
вс, 15 июл. 2018 г. в 22:42, Chuck Davis : > If you decide to proceed on this project there's no need to reinvent the > wheel. > > I use Netbeans for my development. it has quite a good facility for > working with databases and I use it regularly with Postgres. Since > Netbeans is now licensed

Re: Do we need yet another IDE (SQL development assistant) for PostgreSQL?

2018-07-15 Thread Dmitry Igrishin
Thank you all for your responses! Okay, if I decide to start this project, the Linux platform will be supported. As I see it, pgspa (PostgreSQL Server Programming Assistant) should have both the command line interface, and the GUI for visualizing some aspects of the work. The tool should be

Do we need yet another IDE (SQL development assistant) for PostgreSQL?

2018-07-15 Thread Dmitry Igrishin
Hello all, Colleagues. There is an idea to develop a commercial IDE for PostgreSQL under Windows. At the initial stage, not so much an IDE, as an assistant for the server side development. What features would you like to see in such an instrument? Thanks.

Announcement of a new C++ API to PostgreSQL.

2018-05-22 Thread Dmitry Igrishin
Hello everyone, I would like to announce the initial beta release of Pgfe, a modern C++ API to PostgreSQL that simplifies working with PostgreSQL in C++. The page on GitHub - https://github.com/dmitigr/pgfe The documentation - http://dmitigr.ru/pgfe/doc To build Pgfe the C++17 compiler, such as