Re: Get table catalog from pg_indexes

2022-11-27 Thread Igor Korot
Ron, On Sun, Nov 27, 2022 at 4:10 PM Ron wrote: > > On 11/27/22 15:55, Adrian Klaver wrote: > > On 11/27/22 13:31, Ron wrote: > >> On 11/27/22 11:22, Igor Korot wrote: > >>> Hi, ALL, > >>> Table pg_indexes does not contain a fie

Re: Get table catalog from pg_indexes

2022-11-27 Thread Igor Korot
David, On Sun, Nov 27, 2022 at 12:55 PM David G. Johnston wrote: > > On Sun, Nov 27, 2022 at 11:42 AM Igor Korot wrote: >> >> >> It doesn't say anything about "current" DB - only the DB. > > > Yes, but you must be connected to some database in orde

Re: Get table catalog from pg_indexes

2022-11-27 Thread Igor Korot
Thx, Adrian. On Sun, Nov 27, 2022 at 3:56 PM Adrian Klaver wrote: > > On 11/27/22 13:31, Ron wrote: > > On 11/27/22 11:22, Igor Korot wrote: > >> Hi, ALL, > >> Table pg_indexes does not contain a field for a catalog. > >> > >> So how do I ge

Re: Get table catalog from pg_indexes

2022-11-27 Thread Igor Korot
Hi, Christopher, On Sun, Nov 27, 2022 at 12:45 PM Christophe Pettus wrote: > > > > > On Nov 27, 2022, at 10:42, Igor Korot wrote: > > > > It doesn't say anything about "current" DB - only the DB. > > In PostgreSQL terminology, a single PostgreSQL

Re: Get table catalog from pg_indexes

2022-11-27 Thread Igor Korot
Hi, Erik, On Sun, Nov 27, 2022 at 11:59 AM Erik Wienhold wrote: > > > On 27/11/2022 18:22 CET Igor Korot wrote: > > > > Table pg_indexes does not contain a field for a catalog. > > > > So how do I get that? > > > > SELECT 1 FROM pg_in

Get table catalog from pg_indexes

2022-11-27 Thread Igor Korot
Hi, ALL, Table pg_indexes does not contain a field for a catalog. So how do I get that? SELECT 1 FROM pg_indexes WHERE indexname = $1 AND tablename = $2 AND schemaname = $3 Thank you.

Re: Printf-like function

2022-11-11 Thread Igor Korot
Thank you. On Fri, Nov 11, 2022 at 11:12 PM Tom Lane wrote: > > Igor Korot writes: > > Is there a printf-lilke function inside libpq that can be used > > to create a proper query string with the proper quoting of the > > literal? > > No. You'd be better off

Printf-like function

2022-11-11 Thread Igor Korot
Hi, ALL, Is there a printf-lilke function inside libpq that can be used to create a proper query string with the proper quoting of the literal? Or I will need to use sprintf()? Thank you.

List user databases

2022-11-09 Thread Igor Korot
Hi, ALL, According to https://chartio.com/resources/tutorials/how-to-list-databases-and-tables-in-postgresql-using-psql/, there are generally 3 system DBs. However I'm confused with the word general. How many system databases can be made on a PG server? Thank you.

Re: Attaching database

2022-10-18 Thread Igor Korot
ards, > > On 10/15/22 02:06, Julien Rouhaud wrote: > > Hi, > > > > On Fri, Oct 14, 2022 at 11:16:44PM -0500, Igor Korot wrote: > >> Sorry for resurrecting this old thread... > >> If an attaching the DB creates new connection which will be cmpletely > >> i

Re: Attaching database

2022-10-15 Thread Igor Korot
Hi, Adrian, On Sat, Oct 15, 2022, 10:51 AM Adrian Klaver wrote: > On 10/15/22 08:20, Adrian Klaver wrote: > > On 10/14/22 21:46, Igor Korot wrote: > > > > > >> Making catalog current means switching between DBs. > >> Remember initially I connected to (fi

Re: Attaching database

2022-10-14 Thread Igor Korot
Hi, David et al, On Fri, Oct 14, 2022 at 11:39 PM David G. Johnston wrote: > > On Fri, Oct 14, 2022 at 9:17 PM Igor Korot wrote: >> >> Hi, guys, >> >> On Sun, Oct 25, 2020 at 1:27 PM Peter J. Holzer wrote: >> > >> > On 2020-10-19 20:21:05 +0200,

Re: Attaching database

2022-10-14 Thread Igor Korot
Hi, guys, On Sun, Oct 25, 2020 at 1:27 PM Peter J. Holzer wrote: > > On 2020-10-19 20:21:05 +0200, Pavel Stehule wrote: > > po 19. 10. 2020 v 20:18 odesílatel Igor Korot napsal: > > On Mon, Oct 19, 2020 at 12:51 PM Pavel Stehule > > wrote: > >

Re: Is there Postgres ODBC binary for OSX?

2022-09-30 Thread Igor Korot
Hi, On Fri, Sep 30, 2022 at 10:41 AM Daniel Gustafsson wrote: > > > On 30 Sep 2022, at 17:36, Igor Korot wrote: > > > Is building it myself the only option? > > A quick googling indicates that there are options in the macOS package > managers: > >

Is there Postgres ODBC binary for OSX?

2022-09-30 Thread Igor Korot
Hi, ALL, Is building it myself the only option? Thank you.

Is ODBC list dead?

2022-08-12 Thread Igor Korot
Hi, If the list IS dead - where can I get help on the topic... Thank you.

Is ODBC list still alive?

2022-08-11 Thread Igor Korot
Thank you.

Re: Logging the query executed on the server

2022-07-24 Thread Igor Korot
th: > > b2bcreditonline=# select pg_current_logfile(); > pg_current_logfile > > /log/pg.csv 2 things: 1. How do I turn this off? ;-) 2. The log does show the query but it shows it with the placeholders. Is there a way to see the actual query? Thank you. > &

Logging the query executed on the server

2022-07-23 Thread Igor Korot
Hi, Is it possible to log the query that will be executed on the server? I'm writing an application that connects to the server through ODBC and libpq. For some reason ODBC interface is failing - it desn't return any rows So I'm thinking if I have a proof that the query I am actually executing

Re: Getting the table ID

2022-07-19 Thread Igor Korot
Hi, guys, On Tue, Jul 19, 2022 at 4:42 AM Walter Dörwald wrote: > > On 19 Jul 2022, at 5:10, Igor Korot wrote: > > Hi, guys, > > In the database theory each table is identified as "schema_name"."table_name". > > When I tried to look at how to get

Getting the table ID

2022-07-18 Thread Igor Korot
Hi, guys, In the database theory each table is identified as "schema_name"."table_name". When I tried to look at how to get the table id inside the PostgreSQL, I saw that I needed to look at the pg_class table. SELECT oid FROM pg_class WHERE relname = "table_name"; However that query will give

Re: Get the table creation DDL

2022-07-11 Thread Igor Korot
Hi, On Mon, Jul 11, 2022 at 7:56 AM Rob Sargent wrote: > > On 7/11/22 06:31, Mladen Gogala wrote: > > On 7/10/22 22:52, Rob Sargent wrote: > >> Are you alone or on a team? No, this is my personal project. Thank you. > > > > What are your pronouns? > > > This did make me chuckle, but no I am

Re: Get the table creation DDL

2022-07-10 Thread Igor Korot
Hi, On Sun, Jul 10, 2022 at 8:14 PM Mladen Gogala wrote: > > On 7/10/22 21:13, Igor Korot wrote: > > How should I do that? > > Thank you. > > Oh boy! I give up. Does he mean I need to make it as a GitHub module? Can I even do that given that you use GitLab and my proj

Re: Get the table creation DDL

2022-07-10 Thread Igor Korot
Hi, On Sun, Jul 10, 2022 at 8:09 PM Rob Sargent wrote: > > > > > On Jul 10, 2022, at 6:16 PM, Igor Korot wrote: > > > > Hi, > > > >> On Sun, Jul 10, 2022 at 7:02 PM Mladen Gogala > >> wrote: > >> > >> On 7/10/22 17:00, Igor

Re: Get the table creation DDL

2022-07-10 Thread Igor Korot
Hi, On Sun, Jul 10, 2022 at 7:02 PM Mladen Gogala wrote: > > On 7/10/22 17:00, Igor Korot wrote: > > I understand. > The Problem is that I need to put this inside the C/ODBC interface for > my project. > > I'm sure it is not a problem when people are working out of psql o

Re: Get the table creation DDL

2022-07-10 Thread Igor Korot
Hi, On Sun, Jul 10, 2022 at 2:27 PM Mladen Gogala wrote: > > On 7/10/22 12:47, Igor Korot wrote: > > So there is no "query" per se? > Also how do I pass the table name? > > Thank you. > > You can create one from the catalog tables. Personally, I would use &

Re: Get the table creation DDL

2022-07-10 Thread Igor Korot
Hi, On Sun, Jul 10, 2022 at 12:47 PM Ray O'Donnell wrote: > > On 10/07/2022 17:47, Igor Korot wrote: > > Hi, Michael, > > > > On Sun, Jul 10, 2022 at 11:13 AM Michael Nolan wrote: > >> > >> > >> > >> On Sun, Jul 10, 2022 at 10:28 AM

Re: Get the table creation DDL

2022-07-10 Thread Igor Korot
Hi, On Sun, Jul 10, 2022 at 11:47 AM Igor Korot wrote: > > Hi, Michael, > > On Sun, Jul 10, 2022 at 11:13 AM Michael Nolan wrote: > > > > > > > > On Sun, Jul 10, 2022 at 10:28 AM Igor Korot wrote: > >> > >> Hi, > >> Is there

Re: Get the table creation DDL

2022-07-10 Thread Igor Korot
Hi, Michael, On Sun, Jul 10, 2022 at 11:13 AM Michael Nolan wrote: > > > > On Sun, Jul 10, 2022 at 10:28 AM Igor Korot wrote: >> >> Hi, >> Is there a query I can execute that will give me CREATE TABLE() command >> used to create a table? So there is n

Get the table creation DDL

2022-07-10 Thread Igor Korot
Hi, Is there a query I can execute that will give me CREATE TABLE() command used to create a table? Thank you.

Re: How to write such a query?

2022-01-05 Thread Igor Korot
FROM foo WHERE id = ?; i.e. using unnamed parameter. Thank you. > > On Thu, Jan 6, 2022 at 12:10 PM Igor Korot wrote: > > > > Hi, ALL, > > In SQLite you can write: > > > > SELECT a, b, c FROM foo WHERE id = :id; > > > > where ":

Re: How to write such a query?

2022-01-05 Thread Igor Korot
Hi, David, On Thu, Jan 6, 2022 at 1:00 AM David G. Johnston wrote: > > On Wednesday, January 5, 2022, Igor Korot wrote: >> >> >> Is there a way to write such a SELECT statement with the >> named parameter in PostgreSQL? > > > The server, and its prepared S

Re: How to write such a query?

2022-01-05 Thread Igor Korot
Hi, Ron, On Thu, Jan 6, 2022 at 1:01 AM Ron wrote: > > On 1/6/22 12:39 AM, 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. > > >

How to write such a query?

2022-01-05 Thread Igor Korot
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 a way to write such a SELECT statement with the named parameter in

Re: Splitting libpq build

2021-10-03 Thread Igor Korot
Hi, Tom, On Sun, Oct 3, 2021 at 5:27 PM Tom Lane wrote: > > Igor Korot writes: > > Imagine you are a developer/maintainer of sme software. This software needs > > to > > connect to different DBMSes perform soe operations and then disconnect. > > It is very

Re: Splitting libpq build

2021-10-03 Thread Igor Korot
Hi, Adrian, On Sun, Oct 3, 2021 at 3:28 PM Adrian Klaver wrote: > > On 10/3/21 1:20 PM, Igor Korot wrote: > > Hi Tom, > > > > On Sun, Oct 3, 2021 at 3:11 PM Tom Lane wrote: > >> > >> Igor Korot writes: > >>> I wonder who ade the decision n

Re: Splitting libpq build

2021-10-03 Thread Igor Korot
Hi Tom, On Sun, Oct 3, 2021 at 3:11 PM Tom Lane wrote: > > Igor Korot writes: > > I wonder who ade the decision not to provide an independent build > > of the client library of PostgreSQL? And what was the reason behind it? > > It wasn't worth the maintenance trouble.

Splitting libpq build

2021-10-03 Thread Igor Korot
Hi, ALL, I wonder who ade the decision not to provide an independent build of the client library of PostgreSQL? And what was the reason behind it? Its very annoying to build the whole server, just to create a client library to connect to a remote DB. And then kill the build after the install as

Re:

2021-09-01 Thread Igor Korot
Hi, On Wed, Sep 1, 2021 at 9:37 AM obi reddy wrote: > > Windows version:10 > Postgresql version:13. > > On Wed, 1 Sep 2021, 6:47 pm Igor Korot, wrote: >> >> Hi, >> >> On Wed, Sep 1, 2021 at 7:57 AM obi reddy wrote: >> > >> > 1.How to set

Re:

2021-09-01 Thread Igor Korot
Hi, On Wed, Sep 1, 2021 at 7:57 AM obi reddy wrote: > > 1.How to set replication in windows machine. > 2. How to take incremental backup in windows machine. What Windows version do you use? What PostgreSQL version? Thank you. > > Thank you > Obireddy.G > > On Wed,

Re:

2021-09-01 Thread Igor Korot
Hi, On Wed, Sep 1, 2021, 07:32 obi reddy wrote: > Hi everyone > > is there any one working on PostgreSQL windows machine. > You mean server installed on Windows? Or client? If the client - which one? And what is your question? Thank you. > Thank you & Regards > Obireddy.G >

Re:

2021-07-02 Thread Igor Korot
Hi, On Fri, Jul 2, 2021, 5:24 AM Atul Kumar wrote: > Hi, > > I have one query like below : > > > SELECT > m.iMemberId "memberId", > m.cFirstName "firstName", > m.cLastName

Re: How can I insert the image as a blob in the table

2021-04-11 Thread Igor Korot
Hi, David, On Sun, Apr 11, 2021 at 6:57 PM David G. Johnston wrote: > > On Sunday, April 11, 2021, Igor Korot wrote: >> >> Hi, David, >> >> >> On Sun, Apr 11, 2021 at 6:24 PM David G. Johnston >> wrote: >> >> > If you can dec

Re: How can I insert the image as a blob in the table

2021-04-11 Thread Igor Korot
Hi, David, On Sun, Apr 11, 2021 at 6:24 PM David G. Johnston wrote: > > On Sun, Apr 11, 2021 at 2:04 PM Igor Korot wrote: >> >> Hi, ALL, >> I have an image on my hard drive and I'd like to store it in the BLOB >> column of the images table. >> >> Is t

How can I insert the image as a blob in the table

2021-04-11 Thread Igor Korot
Hi, ALL, I have an image on my hard drive and I'd like to store it in the BLOB column of the images table. Is there a simple SQL to do that in PostgreSQL? Thank you.

Re: Error message

2021-03-15 Thread Igor Korot
Thx, David. I need to get some sleep. ;-) On Tue, Mar 16, 2021 at 12:35 AM David G. Johnston wrote: > > On Monday, March 15, 2021, Igor Korot wrote: >> >> [quote] >> As with PQexec, the result is normally a PGresult object whose >> contents indicate server-s

Error message

2021-03-15 Thread Igor Korot
Hi, ALL, Documentation for PQprepare states: [quote] As with PQexec, the result is normally a PGresult object whose contents indicate server-side success or failure. A null result indicates out-of-memory or inability to send the command at all. Use PQerrorMessage to get more information about

Re: copy command - something not found

2020-12-29 Thread Igor Korot
Hi You could try to do "set +x" before running the script... Thank you. On Tue, Dec 29, 2020, 2:23 PM David G. Johnston wrote: > On Tue, Dec 29, 2020 at 1:01 PM Susan Hurst < > susan.hu...@brookhurstdata.com> wrote: > >> Actually, the -c was in an example of a copy command that I found while

Re: Different bitness

2020-11-08 Thread Igor Korot
Thx, Tom. On Sun, Nov 8, 2020 at 2:21 PM Tom Lane wrote: > > Igor Korot writes: > > ld: fatal: file ../postgresql/src/interfaces/libpq/libpq.so: wrong ELF > > class: ELFCLASS32 > > That path doesn't seem to quite agree with this one: > > > igor@solaris:~/dbhand

Different bitness

2020-11-08 Thread Igor Korot
Hi, ALL, [code] CC -m64 -std=c++11 -o dist/Debug/OracleDeveloperStudio-Solaris-x86/liblibpostgres.so build/Debug/OracleDeveloperStudio-Solaris-x86/database_postgres.o -L../postgresql/src/interfaces/libpq -lpq -m64 -std=c++11 -G -KPIC -norunpath -h liblibpostgres.so ld: fatal: file

Re: Building for 64-bit platform

2020-11-08 Thread Igor Korot
Thx. On Sun, Nov 8, 2020 at 12:15 AM Tom Lane wrote: > > Igor Korot writes: > > I build libpq with the standard configure/dmake. > > Now I realize I need t build it for a 64-bit platform. > > > My questions are: > > Is it enough to ust do > > Do &qu

Building for 64-bit platform

2020-11-07 Thread Igor Korot
Hi, I build libpq with the standard configure/dmake. Now I realize I need t build it for a 64-bit platform. My questions are: Is it enough to ust do [code] cd libpq CFLAGS="-m64" LDFLAGS="-m64" ./configure dmake [/code] or I have to do: [code] dmake clean [/code] ? 2. Is my configure line

Re: Attaching database

2020-10-19 Thread Igor Korot
Hi, Pavel, On Mon, Oct 19, 2020 at 12:51 PM Pavel Stehule wrote: > > Hi > > po 19. 10. 2020 v 19:40 odesílatel Igor Korot napsal: >> >> Hi, >> IIUC, PostgreSQL does not support attaching a database to an existing >> connection. >> Howeve

Attaching database

2020-10-19 Thread Igor Korot
Hi, IIUC, PostgreSQL does not support attaching a database to an existing connection. However I was told that I can use this: https://www.postgresql.org/docs/9.3/postgres-fdw.html. Is it the same thing? Why there is no simple ATTACH AS ? Thank you.

Re: Failed to compile libpq

2020-10-15 Thread Igor Korot
Tom, On Thu, Oct 15, 2020 at 12:16 AM Tom Lane wrote: > > Igor Korot writes: > > On Thu, Oct 15, 2020 at 12:01 AM Tom Lane wrote: > >> Kinda looks like you're using some non-GNU make. > > > Correct. > > It is from Solaris Studio compiler. > > >

Re: Failed to compile libpq

2020-10-14 Thread Igor Korot
Tom et al, On Thu, Oct 15, 2020 at 12:01 AM Tom Lane wrote: > > Igor Korot writes: > > Configure succeeded, but running "make" failed with > > > [quote] > > make: Fatal error in reader ../../../src/Makefile.global, line 45: > > Unexpected end of

Failed to compile libpq

2020-10-14 Thread Igor Korot
Hi, ALL, I just tried to compile libpq on latest Solaris x86 (12.4) with Solaris compiler (Sollaris Studio) version 12.6. Configure succeeded, but running "make" failed with [quote] make: Fatal error in reader ../../../src/Makefile.global, line 45: Unexpected end of line seen [/quote] Is there

Re: Can't query system tables during transaction

2020-10-04 Thread Igor Korot
Hi, On Sun, Oct 4, 2020 at 3:30 PM Tom Lane wrote: > > Igor Korot writes: > > I'm trying to execute following: > > > SELECT 1 FROM pg_class c, pg_namespace n WHERE n.oid = c.relnamespace > > AND c.relname = 'foo' AND n.nspname = public; > > I suppose you meant

Can't query system tables during transaction

2020-10-04 Thread Igor Korot
Hi, ALL, I'm trying to execute following: SELECT 1 FROM pg_class c, pg_namespace n WHERE n.oid = c.relnamespace AND c.relname = 'foo' AND n.nspname = public; inside the transaction. I'm getting the following error: ERROR: current transaction is aborted, commands ignored until end of

Re: How to write such a query

2020-09-18 Thread Igor Korot
Ken, On Fri, Sep 18, 2020 at 3:35 PM Ken Tanzer wrote: > On Fri, Sep 18, 2020 at 1:26 PM Ron wrote: > >> On 9/18/20 3:18 PM, Igor Korot wrote: >> > Thank you for the info. >> My problem is that I want to emulate Access behavior. >> >> As I said - Ac

Re: How to write such a query

2020-09-18 Thread Igor Korot
Hi, Ken, On Fri, Sep 18, 2020 at 2:46 PM Ken Tanzer wrote: > > How to find what the primary key (or UNIQUE identifier) value is >> > for row 5 in the recordset? >> >> You're missing the point: as mentioned before, there is no "row 5". To >> update the 5th record that you've fetched, you

Re: How to write such a query

2020-09-18 Thread Igor Korot
Hi, Adrian, On Fri, Sep 18, 2020 at 12:58 PM Adrian Klaver wrote: > > On 9/18/20 10:46 AM, Igor Korot wrote: > > Hi, Johnathan, > > > > On Fri, Sep 18, 2020 at 12:34 PM Jonathan Strong > > mailto:jonathanrstr...@gmail.com>> wrote: > > > >

Re: How to write such a query

2020-09-18 Thread Igor Korot
. > - Jon > > <https://www.linkedin.com/in/jonstrong/> > <https://www.jonathanrstrong.com> > > *Jonathan Strong* > > CIO / CTO / Consultant > > *P:* 609-532-1715 *E:* jonathanrstr...@gmail.com > > *Quora Top Writer <https://www.quora.com/profile/Jo

Re: How to write such a query

2020-09-18 Thread Igor Korot
Hi, Paul On Fri, Sep 18, 2020 at 12:34 PM Paul Förster wrote: > > Hi Igor, > > > On 18. Sep, 2020, at 19:29, Igor Korot wrote: > > > > Hi, > > Consider following > > > > [code] > > CREATE TABLE X(id INTEGER PRIMARY KEY, field1 char(50), fie

How to write such a query

2020-09-18 Thread Igor Korot
Hi, Consider following [code] CREATE TABLE X(id INTEGER PRIMARY KEY, field1 char(50), field2 int); CREATE TABLE Y(id INTEGER PRIMARY KEY, field1 char, field2 double(10, 2)); SELECT X.field1, Y.field2 from X, Y WHERE X.id = Y.id; [/code] Assuming that the SELECT return 10 rows, I want to update

Re: Need free PG odbc driver for Windows 10

2020-07-28 Thread Igor Korot
Hi, On Tue, Jul 28, 2020 at 11:40 AM David Gauthier wrote: > > Hi: > > I need a free odbc driver for PG to be installed on Windows 10 that my user > community can easily install. By "easily install" I mean no binaries, no > zipped file, etc... just point-click-install (with the usual

Re: Connecting Powerbuilder / EAserver to PostgreSQL server 11 via ODBC or JDBC

2020-06-26 Thread Igor Korot
Hi, On Fri, Jun 26, 2020, 8:31 AM Matthias Apitz wrote: > > Hello, > > After the very successful migration of our Library Management System > (which uses ESQL/C, DBI, JDBC) together with PostgreSQL 11.4, we want to > do the > same with another LMS written in Powerbuild, running in an EAServer

Re: Problems modifyiong view

2019-11-14 Thread Igor Korot
Hi, On Thu, Nov 14, 2019 at 7:54 AM stan wrote: > > I am trying to add columns to a view using CREATE OR REPLACE VIEW, and I am > getting the following error: > > ERROR: cannot change name of view column "descrip" to "contact_person_1" > > I suppose I can drop the view, and recreate it, but

Re: Recomended front ends?

2019-08-07 Thread Igor Korot
Hi, On Wed, Aug 7, 2019 at 1:57 PM stan wrote: > > I am in the process of defining an application for a very small company > that uses Postgresql for the backend DB. This DB will eventually run on a > hosted machine. As you imagine all of the employees have Windows machines > for their normal

Re: Recomended front ends?

2019-08-07 Thread Igor Korot
Hi, On Wed, Aug 7, 2019 at 1:57 PM stan wrote: > > I am in the process of defining an application for a very small company > that uses Postgresql for the backend DB. This DB will eventually run on a > hosted machine. As you imagine all of the employees have Windows machines > for their normal

Re: Query plan: SELECT vs INSERT from same select

2019-07-23 Thread Igor Korot
Hi, On Tue, Jul 23, 2019 at 3:29 PM Alexander Voytsekhovskyy wrote: > > I have quite complicated query: > > SELECT axis_x1, axis_y1, SUM(delivery_price) as v_1 FROM ( > SELECT to_char(delivery_data.delivery_date, '-MM') as axis_x1, > clients.id_client as axis_y1, delivery_data.amount *

Re: Inserting into the blob

2019-06-10 Thread Igor Korot
Hi, David, On Mon, Jun 10, 2019 at 10:45 PM David G. Johnston wrote: > > On Mon, Jun 10, 2019 at 8:32 PM Rob Sargent wrote: >> >> > On Jun 10, 2019, at 6:40 AM, Igor Korot wrote: >> > >> > Hi, Adrian, >> > >> >> On Mon, Jun 10, 2019

Re: Inserting into the blob

2019-06-10 Thread Igor Korot
Hi, Adrian, On Mon, Jun 10, 2019 at 7:03 PM Adrian Klaver wrote: > > On 6/10/19 9:30 AM, Igor Korot wrote: > > > > > According to > > https://stackoverflow.com/questions/16048649/postgresql-9-x-pg-read-binary-file-inserting-files-into-bytea, > > the file needs

Re: Inserting into the blob

2019-06-10 Thread Igor Korot
Hi, Adrian, On Mon, Jun 10, 2019 at 8:38 AM Adrian Klaver wrote: > > On 6/9/19 10:06 AM, Igor Korot wrote: > > Hi, Adrian, > > > > On Sun, Jun 9, 2019 at 11:14 PM Adrian Klaver > > wrote: > >> > >> On 6/9/19 8:28 AM, Igor Korot wrote: > >&

Re: Inserting into the blob

2019-06-09 Thread Igor Korot
Hi, Adrian, On Sun, Jun 9, 2019 at 11:14 PM Adrian Klaver wrote: > > On 6/9/19 8:28 AM, Igor Korot wrote: > > Hi, ALL, > > How do I insert the png file (content, not a name) into the BLOB field > > in the table i PostgreSQL DB? > > Are you talking ab

Inserting into the blob

2019-06-09 Thread Igor Korot
Hi, ALL, How do I insert the png file (content, not a name) into the BLOB field in the table i PostgreSQL DB? Thank you.

Re: Back Slash \ issue

2019-05-03 Thread Igor Korot
Hi, On Fri, May 3, 2019 at 11:20 AM Michael Nolan wrote: > > > > I'm still not clear what the backslash is for, it is ONLY to separate first > and last name? Can you change it to some other character? > > Others have suggested you're in a Windows environment, that might limit your > options.

Compilation fails with Solaris Studio 12.6

2019-04-14 Thread Igor Korot
Hi, [quote] igor@solaris:~/dbhandlerSol/postgresql$ ./configure checking build system type... i386-pc-solaris2.11 checking host system type... i386-pc-solaris2.11 checking which template to use... solaris checking whether to build with 64-bit integer date/time support... yes checking whether NLS

Re: Installing PostgreSQL on Oracle Solaris

2019-03-23 Thread Igor Korot
Hi, On Sat, Mar 23, 2019 at 10:42 AM Tom Lane wrote: > > Igor Korot writes: > >>>> igor@solaris:/usr$ sudo bunzip2 < postgresql-9.6.1-S11.i386-64.tar.bz2 > >>>> | tar xpf - > > > On Sat, Mar 23, 2019 at 9:25 AM Ron wrote: > >> Off h

Re: Installing PostgreSQL on Oracle Solaris

2019-03-23 Thread Igor Korot
Hi, On Sat, Mar 23, 2019 at 10:36 AM Hans Schou wrote: > > > > On Sat, Mar 23, 2019 at 3:48 PM Igor Korot wrote: >> >> >> You mean even running as "sudo"? > > > igor@solaris:/usr$ sudo bunzip2 < postgresql-9.6.1-S11.i386-64.tar.bz2 > | t

Re: Installing PostgreSQL on Oracle Solaris

2019-03-23 Thread Igor Korot
Hi, On Sat, Mar 23, 2019 at 10:17 AM Ron wrote: > > On 3/22/19 9:50 PM, Igor Korot wrote: > > Hi > > On Sat, Mar 23, 2019 at 9:25 AM Ron wrote: > > On 3/23/19 8:58 AM, Adrian Klaver wrote: > > On 3/22/19 11:59 PM, Igor Korot wrote: > > Hi, ALL, > I tri

Re: Installing PostgreSQL on Oracle Solaris

2019-03-23 Thread Igor Korot
Hi, On Sat, Mar 23, 2019 at 9:55 AM Michael Loftis wrote: > > > > On Sat, Mar 23, 2019 at 08:48 Igor Korot wrote: >> >> >> > [code] >> > igor@solaris:/usr$ sudo bunzip2 < postgresql-9.6.1-S11.i386-64.tar.bz2 >> >> You mean even runnin

Re: Installing PostgreSQL on Oracle Solaris

2019-03-23 Thread Igor Korot
Hi On Sat, Mar 23, 2019 at 9:25 AM Ron wrote: > > On 3/23/19 8:58 AM, Adrian Klaver wrote: > > On 3/22/19 11:59 PM, Igor Korot wrote: > > Hi, ALL, > I tried to follow an instructions at > https://www.postgresql.org/ftp/binary/v9.6.1/solaris/solaris11/i386/ > i

Installing PostgreSQL on Oracle Solaris

2019-03-22 Thread Igor Korot
Hi, ALL, I tried to follow an instructions at https://www.postgresql.org/ftp/binary/v9.6.1/solaris/solaris11/i386/ in the README but I received following: [code] igor@solaris:/usr$ sudo bunzip2 < postgresql-9.6.1-S11.i386-64.tar.bz2 | tar xpf - tar: postgres: Permission denied tar: postgres:

Re: Comparing dates in DDL

2019-01-04 Thread Igor Korot
Hi, Rich, On Fri, Jan 4, 2019 at 10:53 AM Rich Shepard wrote: > >I have a projects table that includes these two columns: > > start_date date DEFAULT CURRENT_DATE, > end_date date > CONSTRAINT valid_start_date > CHECK (start_date <= end_date), > >1. Do I need a DEFAULT

Re: libpq bug?

2018-12-31 Thread Igor Korot
Hi, So, does anybody have an idea? I do have following code at the beginning of the cpp file: #ifdef WIN32 #include #pragma execution_character_set("utf-8") #endif but even running it on OSX, I am getting this same error. Thank you. On Fri, Dec 28, 2018 at 11:30 PM Igor Korot wro

Re: libpq bug?

2018-12-29 Thread Igor Korot
Hi, On Sat, Dec 29, 2018 at 1:37 AM patrick keshishian wrote: On Fri, Dec 28, 2018 at 5:40 PM Igor Korot wrote: Hi, Patrick, Here is my new code: int PostgresDatabase::GetTableOwner (const std::wstring schemaName, const std::wstring tableName, std::wstring owner, std::vector errorMsg

Re: libpq bug?

2018-12-28 Thread Igor Korot
h2 variable contains the value of 8 and I'm still getting the same error. Any idea? Thank you. On Fri, Dec 28, 2018 at 5:40 PM patrick keshishian wrote: > > On Fri, Dec 28, 2018 at 3:07 PM Igor Korot wrote: >> >> Hi, >> >> On Fri, Dec 28, 2018 at 4:51 PM patrick k

Re: libpq bug?

2018-12-28 Thread Igor Korot
Hi, On Fri, Dec 28, 2018 at 5:07 PM Igor Korot wrote: > > Hi, > > On Fri, Dec 28, 2018 at 4:51 PM patrick keshishian wrote: > > > > > > On Fri, Dec 28, 2018 at 2:00 PM Igor Korot wrote: > >> > >> Hi, ALL, > >> Following code: > >

Re: libpq bug?

2018-12-28 Thread Igor Korot
Hi, On Fri, Dec 28, 2018 at 4:51 PM patrick keshishian wrote: > > > On Fri, Dec 28, 2018 at 2:00 PM Igor Korot wrote: >> >> Hi, ALL, >> Following code: >> >> int PostgresDatabase::GetTableOwner (const std::wstring , >> const std::wstring , std::wst

libpq bug?

2018-12-28 Thread Igor Korot
Hi, ALL, Following code: int PostgresDatabase::GetTableOwner (const std::wstring , const std::wstring , std::wstring , std::vector ) { int result = 0; std::wstring query = L"SELECT u.usename FROM pg_class c, pg_user u, pg_namespace n WHERE n.oid = c.relnamespace AND u.usesysid = c.relowner

Error on Windows

2018-12-26 Thread Igor Korot
Hi, ALL, The following code compiles and executes but returns an error: [quote] Invalid byte sequence for encoding UTF8 [/quote] [code] char *values[2]; values[0] = NULL, values[1] = NULL; values[0] = new char[schemaName.length() + 1]; values[1] = new char[tableName.length() +

Re: NOTIFY/LISTEN with ODBC interface

2018-12-24 Thread Igor Korot
Hi, Clemens, et al, On Tue, Dec 25, 2018 at 12:23 AM Clemens Ladisch wrote: > > Igor Korot wrote: > >Is there a way to write [LISTEN/NOTIFY] with the ODBC interface? > > At the moment, no. > > ODBC is a standard interface, so there are no functions for this defined.

Re: NOTIFY/LISTEN with ODBC interface

2018-12-24 Thread Igor Korot
hat can retrieve this. So can this be done with ODBC interface, and if yes - how? Thank you. > > -----Original Message- > From: Igor Korot > Sent: Sunday, December 23, 2018 9:37 PM > To: PostgreSQL ODBC list ; pgsql-general > > Subject: NOTIFY/LISTEN with ODBC int

NOTIFY/LISTEN with ODBC interface

2018-12-23 Thread Igor Korot
Hi, Is there a way to write a code found at https://www.postgresql.org/docs/9.1/libpq-example.html Example 2 with the ODBC interface? Thank you.

IF NOT EXIST

2018-12-17 Thread Igor Korot
Hi, ALL, I have a following statement: IF NOT EXIST( SELECT 1 SELECT 1 FROM pg_proc AS proc, pg_namespace AS ns ) CREATE FUNCTION(); Unfortunately trying to execute it thru the ODBC interface with: ret = SQLExecDirect( m_hstmt, query, SQL_NTS ); gives syntax error near IF. What is the proper

Re: How to watch for schema changes

2018-12-04 Thread Igor Korot
Igor, On Tue, Dec 4, 2018 at 8:20 AM Igor Neyman wrote: > > > -Original Message- > From: Igor Korot [mailto:ikoro...@gmail.com] > Sent: Monday, December 03, 2018 8:29 AM > To: Adrian Klaver > Cc: pgsql-general > Subject: Re: How to

Re: How to watch for schema changes

2018-12-03 Thread Igor Korot
Hi, Adrian, On Mon, Dec 3, 2018 at 5:15 PM Adrian Klaver wrote: > > On 12/3/18 3:00 PM, Igor Korot wrote: > > Hi, Adrian, > > > > On Mon, Dec 3, 2018 at 4:10 PM Adrian Klaver > > wrote: > >> > >> On 12/3/18 1:53 PM, Igor Korot wrote: > >&

Re: How to watch for schema changes

2018-12-03 Thread Igor Korot
Hi, Adrian, On Mon, Dec 3, 2018 at 4:10 PM Adrian Klaver wrote: > > On 12/3/18 1:53 PM, Igor Korot wrote: > > Hi, Adrian, > > >> Why? Just create the trigger once in a script. Event triggers are an > >> attribute of the database and stay with it until they are

Re: How to watch for schema changes

2018-12-03 Thread Igor Korot
Hi, Adrian, On Mon, Dec 3, 2018 at 11:59 AM Adrian Klaver wrote: > > On 12/3/18 9:53 AM, Igor Korot wrote: > >> So event triggers are associated with > >> events(www.postgresql.org/docs/9.6/event-trigger-matrix.html) in a > >> particular database. A rough desc

  1   2   >