Re: [GENERAL] Importing SQLite database

2016-12-08 Thread Igor Korot
Adrian, On Thu, Dec 8, 2016 at 9:47 AM, Adrian Klaver <adrian.kla...@aklaver.com> wrote: > On 12/08/2016 04:54 AM, Igor Korot wrote: >> >> Hi, ALL, >> I have a text file which I got from exporting the SQLite database. >> >> The file contains an SQL sta

Re: [GENERAL] Importing SQLite database

2016-12-08 Thread Igor Korot
Adrian, On Thu, Dec 8, 2016 at 9:54 AM, Igor Korot <ikoro...@gmail.com> wrote: > Adrian, > > On Thu, Dec 8, 2016 at 9:47 AM, Adrian Klaver <adrian.kla...@aklaver.com> > wrote: >> On 12/08/2016 04:54 AM, Igor Korot wrote: >>> >>> Hi, ALL, &

[GENERAL] Importing SQLite database

2016-12-08 Thread Igor Korot
Hi, ALL, I have a text file which I got from exporting the SQLite database. The file contains an SQL statement which will generate the database. Excerpt from this file: [code] CREATE TABLE leagues( id INTEGER AUTOINCREMENT PRIMARY KEY, name VARCHAR(100),balance DOUBLE(10,2)); CREATE TABLE

Re: [GENERAL] Importing SQLite database

2016-12-10 Thread Igor Korot
>> On 12/08/2016 04:47 PM, Igor Korot wrote: >>> Igors-MacBook-Air:dbhandler igorkorot$ psql -U postgres -d postgres >>> psql: could not connect to server: No such file or directory >>> Is the server running locally and accepting >>> connections on Unix doma

Re: [GENERAL] Importing SQLite database

2016-12-10 Thread Igor Korot
Hi, On Sat, Dec 10, 2016 at 2:50 PM, John R Pierce <pie...@hogranch.com> wrote: > On 12/10/2016 11:32 AM, Igor Korot wrote: >> >> Looking >> athttps://www.postgresql.org/docs/9.5/static/datatype-numeric.html, >> I don't see a 'boolean' as supported data type.

Re: [GENERAL] Importing SQLite database

2016-12-10 Thread Igor Korot
Thank you Adrian. That was it. Now I can continue testing. On Sat, Dec 10, 2016 at 11:26 PM, Adrian Klaver <adrian.kla...@aklaver.com> wrote: > On 12/10/2016 06:56 PM, Igor Korot wrote: >> >> Hi, >> >> On Sat, Dec 10, 2016 at 2:50 PM, John R Pierce <pie...@h

Re: [GENERAL] Importing SQLite database

2016-12-08 Thread Igor Korot
; Sent: Donnerstag, 8. Dezember 2016 16:09 >> To: Igor Korot <ikoro...@gmail.com> >> Cc: pgsql-general@postgresql.org >> Subject: Re: [GENERAL] Importing SQLite database >> >> On 12/08/2016 06:54 AM, Igor Korot wrote: >> > Adrian, >> >

[GENERAL] PostgreSQL ODBC driver for OSX 10.8

2016-12-01 Thread Igor Korot
Hi, ALL, This is my first post here. I have actually 2 questions which are kind of related. 1. Is there an OSX version of the ODBC PostgreSQL driver? 1a. If there is none - is there an instructions on how to build and install it? 2. Is PostgreSQL ODBC driver works with iODBC? Thank you. --

Re: [GENERAL] PostgreSQL ODBC driver for OSX 10.8

2016-12-01 Thread Igor Korot
Adrian, On Thu, Dec 1, 2016 at 11:37 AM, Adrian Klaver <adrian.kla...@aklaver.com> wrote: > On 12/01/2016 08:01 AM, Igor Korot wrote: >> >> Hi, ALL, >> This is my first post here. >> I have actually 2 questions which are kind of related. >> >> 1. I

Re: [GENERAL] PostgreSQL ODBC driver for OSX 10.8

2016-12-01 Thread Igor Korot
e] Thank you. On Thu, Dec 1, 2016 at 12:01 PM, Adrian Klaver <adrian.kla...@aklaver.com> wrote: > On 12/01/2016 08:41 AM, Igor Korot wrote: >> >> Adrian, >> >> On Thu, Dec 1, 2016 at 11:37 AM, Adrian Klaver >> <adrian.kla...@aklaver.com&g

Re: [GENERAL] PostgreSQL ODBC driver for OSX 10.8

2016-12-01 Thread Igor Korot
Hi, Adrian, On Thu, Dec 1, 2016 at 7:30 PM, Adrian Klaver <adrian.kla...@aklaver.com> wrote: > On 12/01/2016 04:21 PM, Igor Korot wrote: >> >> Hi, guys, >> I downloaded the latest sources, but the configure failed. >> I have OSX 10.8 here. >> >&

[GENERAL] Check if prepared statement exist?

2017-08-03 Thread Igor Korot
Hi, ALL, Is there a way to do such a check from the libpq? I'm trying to call a function from 2 different places of the application and want to see if I already had the call to PQprepare(); Thank you. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to

[GENERAL] Where is pg_hba.conf

2017-08-13 Thread Igor Korot
Hi, I have a Mac with OSX 10.8 installed. It has Postgre 9.1. According to https://www.postgresql.org/docs/9.1/static/auth-pg-hba-conf.html and http://www.thegeekstuff.com/2014/02/enable-remote-postgresql-connection/?utm_source=tuicool I need to modify the pg_hba.conf file to get access to the

Re: [GENERAL] Where is pg_hba.conf

2017-08-13 Thread Igor Korot
ug 13, 2017 at 10:37 AM, Christoph Berg <m...@debian.org> wrote: > Re: Igor Korot 2017-08-13 > <ca+fnntz8h-2tkrmv4uyn-fkrfu601cws9-us7vwfpr-fka0...@mail.gmail.com> >> draft=# SHOW hba_file >> draft-# SHOW hba_file; >> ERROR: syntax error at or near &q

Re: [GENERAL] Where is pg_hba.conf

2017-08-13 Thread Igor Korot
Hi, Christoph, On Sun, Aug 13, 2017 at 10:09 AM, Christoph Berg <m...@debian.org> wrote: > Re: Igor Korot 2017-08-13 > <CA+FnnTwxiLXD2H_njPS6yf=nhjae8vcwwfdvppzbcuadmxt...@mail.gmail.com> >> I need to modify the pg_hba.conf file to get access to the DB >> remotel

Re: [GENERAL] Where is pg_hba.conf

2017-08-13 Thread Igor Korot
e it? Or it has to stay for "root" only? Thank you. > > Hope this helps > > > > On Aug 13, 2017, at 9:00 AM, Igor Korot <ikoro...@gmail.com> wrote: > > Hi, > I have a Mac with OSX 10.8 installed. It has Postgre 9.1. > According to > https://www.postgresql

Re: [GENERAL] Where is pg_hba.conf

2017-08-13 Thread Igor Korot
Also, I presume that the address in this file is the address of the machine where the server is located, not the address from where the connection is initiated. On Sun, Aug 13, 2017 at 10:53 AM, Igor Korot <ikoro...@gmail.com> wrote: > Hi, > OK, I found it under the root account.

[GENERAL] Get table OID

2017-07-13 Thread Igor Korot
Hi, ALL, Is it possible to get the table ID (or OID) from information_schema somewhere? Thank you. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Backward compatibility

2017-07-20 Thread Igor Korot
Hi, David, On Thu, Jul 20, 2017 at 10:23 PM, David G. Johnston <david.g.johns...@gmail.com> wrote: > On Thu, Jul 20, 2017 at 7:13 PM, Igor Korot <ikoro...@gmail.com> wrote: >> >> Hi, ALL, >> According to the documentation PostgreSQL 9.6 (latest) support

Re: [GENERAL] Backward compatibility

2017-07-20 Thread Igor Korot
ALso, I presume there is no special libpg function, right? Thank you. On Thu, Jul 20, 2017 at 10:44 PM, Igor Korot <ikoro...@gmail.com> wrote: > Hi, David, > > On Thu, Jul 20, 2017 at 10:23 PM, David G. Johnston > <david.g.johns...@gmail.com> wrote: >> On Thu,

[GENERAL] Backward compatibility

2017-07-20 Thread Igor Korot
Hi, ALL, According to the documentation PostgreSQL 9.6 (latest) supports CREATE INDEX IF NOT EXIST However, the version 9.4 and below supports only CREATE INDEX. Is there a query or a libpg function which can return the version of the server I'm running? And in the latter case - is there a

Re: [GENERAL] Backward compatibility

2017-07-20 Thread Igor Korot
Hi, guys, On Thu, Jul 20, 2017 at 10:19 PM, Andreas Kretschmer <andr...@a-kretschmer.de> wrote: > On 21 July 2017 04:13:47 GMT+02:00, Igor Korot <ikoro...@gmail.com> wrote: >>Hi, ALL, >>According to the documentation PostgreSQL 9.6 (latest) supports >> >>

Re: [GENERAL] Backward compatibility

2017-07-21 Thread Igor Korot
Hi, guys, Below query does not even run: SELECT version(), substring( version() from position( '\s' in version() ) ); Could you spot the error? On Fri, Jul 21, 2017 at 12:11 PM, Igor Korot <ikoro...@gmail.com> wrote: > David et al, > > On Fri, Jul 21, 2017 at 12:00 PM, Da

[GENERAL] What is the problem with this query?

2017-07-23 Thread Igor Korot
Hi, ALL, draft=# IF NOT EXISTS( SELECT 1 FROM pg_class c, pg_namespace n WHERE n.oid = c.relnamespace AND c.relname = 'abcattbl_tnam_ownr' AND n.nspname = 'public' ) THEN CREATE INDEX "abcattbl_tnam_ownr" ON "abcattbl"("abt_tnam" ASC, "abt_ownr" ASC); ERROR: syntax error at or near "IF" LINE 1:

Re: [GENERAL] What is the problem with this query?

2017-07-23 Thread Igor Korot
Hi, Christoph, On Sun, Jul 23, 2017 at 5:30 PM, Christoph Moench-Tegeder <c...@burggraben.net> wrote: > ## Igor Korot (ikoro...@gmail.com): > >> >> Is "IF" operator not supported by PostgreSQL >> So how do I write this properly? > > There is docume

Re: [GENERAL] What is the problem with this query?

2017-07-23 Thread Igor Korot
Hi, David, On Sun, Jul 23, 2017 at 5:07 PM, David G. Johnston <david.g.johns...@gmail.com> wrote: > On Sunday, July 23, 2017, Igor Korot <ikoro...@gmail.com> wrote: >> >> Is "IF" operator not supported by PostgreSQL So how do I write this properly? Than

Re: [GENERAL] ODBC driver issue

2017-07-26 Thread Igor Korot
Hi, John, On Wed, Jul 26, 2017 at 11:08 PM, John R Pierce <pie...@hogranch.com> wrote: > On 7/26/2017 7:25 PM, Igor Korot wrote: >> >> When I tried to query the database table with the column "char(129)" I >> get: >> >> "My field tex

[GENERAL] ODBC driver issue

2017-07-26 Thread Igor Korot
Hi, I'm testing my program and got an interesting issue. I have an OSX 10.8 with iODBC manager and PostgreSQL ODBC driver. When I tried to query the database table with the column "char(129)" I get: "My field text" (the text with the bunch of spaces at the end). The

Re: [GENERAL]

2017-07-19 Thread Igor Korot
Hi, ALL On Thu, May 11, 2017 at 6:47 PM, Adrian Klaver <adrian.kla...@aklaver.com> wrote: > On 05/11/2017 07:26 AM, Igor Korot wrote: >> >> Adrian et al, >> >> On Thu, May 11, 2017 at 9:54 AM, Adrian Klaver >> <adrian.kla...@aklaver.com> wrote: >

Re: [GENERAL] Backward compatibility

2017-07-22 Thread Igor Korot
Thx. The split_part() works perfectly. On Sat, Jul 22, 2017 at 10:49 AM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Igor Korot <ikoro...@gmail.com> writes: >> But it works incorrectly - it should return: >> 9.5.7 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 6.3.1 2

Re: [GENERAL] Backward compatibility

2017-07-22 Thread Igor Korot
Hi, John, On Sat, Jul 22, 2017 at 8:44 AM, John McKown <john.archie.mck...@gmail.com> wrote: > On Fri, Jul 21, 2017 at 10:21 PM, Igor Korot <ikoro...@gmail.com> wrote: >> >> Hi, guys, >> Below query does not even run: >> >> SELECT version(), substr

Re: [GENERAL] Backward compatibility

2017-07-21 Thread Igor Korot
Hi, guys, On Thu, Jul 20, 2017 at 11:58 PM, Tom Lane wrote: > John R Pierce writes: >> On 7/20/2017 8:40 PM, Tom Lane wrote: >>> Hm, we need to update that text for the new 2-part version numbering >>> scheme, don't we? > >> will 10 return like 100100 if

Re: [GENERAL] Backward compatibility

2017-07-21 Thread Igor Korot
David et al, On Fri, Jul 21, 2017 at 12:00 PM, David G. Johnston <david.g.johns...@gmail.com> wrote: > On Fri, Jul 21, 2017 at 8:49 AM, Igor Korot <ikoro...@gmail.com> wrote: >> >> MySQL uses this: >> https://dev.mysql.com/doc/refman/5.7/en/mysql-get-server-vers

Re: [GENERAL] Lifetime of PQexecPrepared() returned value

2017-08-04 Thread Igor Korot
Hi, Michael, On Fri, Aug 4, 2017 at 3:26 PM, Michael Paquier <michael.paqu...@gmail.com> wrote: > On Fri, Aug 4, 2017 at 9:12 PM, Igor Korot <ikoro...@gmail.com> wrote: >> Am I missing something? How do I fix the crash? > > Based on what I can see here, I see no

[GENERAL] Lifetime of PQexecPrepared() returned value

2017-08-04 Thread Igor Korot
Hi, ALL, I have a following piece of code: [code] PGresult *res = PQexecPrepared(); status = PQresultStatue( res ); if( status == PGRES_TUPLES_OK ) { for( int j = 0; j < PQntuples( res ); j++ ) { char *foo = PQgetValue( res, j, 0 ); char *bar = PQgetValue( res, j, 1 );

Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)

2017-08-05 Thread Igor Korot
Hi, Did you try bringing it to SAP? Thank you. On Sat, Aug 5, 2017 at 2:39 PM, Dan Cooperstock at Software4Nonprofits wrote: > Yes my direct SQL testing used all caps and worked fine. > > There is no error message. It's just that PowerBuilder's built-in mechanism

Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)

2017-08-05 Thread Igor Korot
Hi, Dan, On Sat, Aug 5, 2017 at 8:52 PM, Dan Cooperstock at Software4Nonprofits wrote: > No, Carl, when I created the sequence, I didn't put its name in double > quotes, so therefore its name wasn't being forced to stay upper case. So in > the nextval() command,

Re: [GENERAL] Invalid byte sequence for encoding UTF-8 0xc3\n

2017-08-05 Thread Igor Korot
John et al, On Mon, Jul 31, 2017 at 12:13 AM, Igor Korot <ikoro...@gmail.com> wrote: > John, > > On Sun, Jul 30, 2017 at 5:32 PM, Igor Korot <ikoro...@gmail.com> wrote: >> Hi, John, >> >> On Sun, Jul 30, 2017 at 4:53 PM, John R Pierce <pie...@hogranch.

Re: [GENERAL] Lifetime of PQexecPrepared() returned value

2017-08-05 Thread Igor Korot
Hi, guys, On Fri, Aug 4, 2017 at 5:01 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Igor Korot <ikoro...@gmail.com> writes: >> I have a following piece of code: > >> [code] >> PGresult *res = PQexecPrepared(); >> status = PQresultStatue( res ); >> if(

Re: [GENERAL] Invalid byte sequence for encoding UTF-8 0xc3\n

2017-07-30 Thread Igor Korot
Hi, John, On Sun, Jul 30, 2017 at 4:53 PM, John R Pierce <pie...@hogranch.com> wrote: > On 7/30/2017 1:43 PM, Igor Korot wrote: > > what encodings are default on your system ?`\l+` in psql should show the > encodings. > > Is this "backslash + pipe + plus-sign&qu

Re: [GENERAL] Invalid byte sequence for encoding UTF-8 0xc3\n

2017-07-30 Thread Igor Korot
Hi, John, On Sun, Jul 30, 2017 at 4:34 PM, John R Pierce <pie...@hogranch.com> wrote: > On 7/30/2017 1:19 PM, Igor Korot wrote: >> >> I am using a database for my project that I created inside SQLite3. >> This database contains a table called "abc<ALT+225>&q

[GENERAL] Invalid byte sequence for encoding UTF-8 0xc3\n

2017-07-30 Thread Igor Korot
Hi, ALL, I am using a database for my project that I created inside SQLite3. This database contains a table called "abc" (it is "abc" + symbol with the code 225 - greek letter "beta or a German symbol for "ss"). All I did was to export that database into the text file and then imported

Re: [GENERAL] Invalid byte sequence for encoding UTF-8 0xc3\n

2017-07-30 Thread Igor Korot
John, On Sun, Jul 30, 2017 at 5:32 PM, Igor Korot <ikoro...@gmail.com> wrote: > Hi, John, > > On Sun, Jul 30, 2017 at 4:53 PM, John R Pierce <pie...@hogranch.com> wrote: >> On 7/30/2017 1:43 PM, Igor Korot wrote: >> >> what encodings are default on you

[GENERAL] Compiling libpq only on Linux

2017-08-08 Thread Igor Korot
Hi, ALL, Quick question - what is the best way to compile libpq only on Linux? I just checked and currently my distro (I didn't updated in a long time) has 9.5 version as current. Should I grab it, unpack it and do configure and then make inside libpq directory manually? Or there is some other

[GENERAL] Why am I getting doubles?

2017-07-27 Thread Igor Korot
Hi, The query below should get foreign keys for a specific table: draft=# SELECT DISTINCT kcu.ordinal_position AS ordinal, kcu.position_in_unique_constraint AS position, tc.constraint_name AS name, tc.constraint_schema AS schema, tc.table_name AS table, kcu.column_name AS column, ccu.table_name

Re: [GENERAL] Results interpretation

2017-08-18 Thread Igor Korot
omano - NotOrAnd.IT > Information Technologies > -- > NON QVIETIS MARIBVS NAVTA PERITVS > > Il 18 ago 2017 20:45, "Igor Korot" <ikoro...@gmail.com> ha scritto: >> >> Hi, Vincenzo, >> >> On Fri, Aug 18, 2017 at 1:51 PM, Vincenzo Romano >> <

[GENERAL] Results interpretation

2017-08-18 Thread Igor Korot
Hi, I looked at the documentation, but couldn't find it. If I do PQexec() call, the results will be interpreted as binary or text? I'm trying to get an int field from the query and wonder if I need to do hton() call or not? Thank you. -- Sent via pgsql-general mailing list

Re: [GENERAL] Results interpretation

2017-08-18 Thread Igor Korot
t need to do anything? I.e. no ntoh() call? Thank you. > > > > -- > Vincenzo Romano - NotOrAnd.IT > Information Technologies > -- > NON QVIETIS MARIBVS NAVTA PERITVS > > Il 18 ago 2017 19:46, "Igor Korot" <ikoro...@gmail.com> ha scritto: >

Re: [GENERAL] Retrieving query results

2017-08-22 Thread Igor Korot
Hi, Michael, On Tue, Aug 22, 2017 at 8:32 PM, Michael Paquier <michael.paqu...@gmail.com> wrote: > On Wed, Aug 23, 2017 at 3:19 AM, Igor Korot <ikoro...@gmail.com> wrote: >> [quote] >> PQntuples >> >> Returns the number of rows (tuples) in the query result.

Re: [GENERAL] What is the proper query

2017-08-22 Thread Igor Korot
Or this is the bug in 9.1? Since it looks like there are 2 columns with the same info in 1 table/view Thank you. On Tue, Aug 22, 2017 at 12:08 AM, Igor Korot <ikoro...@gmail.com> wrote: > Hi, ALL, > draft=# SELECT * FROM information_schema.key_column_usage WHERE > table_s

Re: [GENERAL] What is the proper query

2017-08-22 Thread Igor Korot
Hi, David, On Tue, Aug 22, 2017 at 12:06 PM, David G. Johnston <david.g.johns...@gmail.com> wrote: > On Tue, Aug 22, 2017 at 8:43 AM, Igor Korot <ikoro...@gmail.com> wrote: >> >> Or this is the bug in 9.1? >> Since it looks like there are 2 columns with

[GENERAL] Retrieving query results

2017-08-22 Thread Igor Korot
Hi, ALL, [quote] PQntuples Returns the number of rows (tuples) in the query result. Because it returns an integer result, large result sets might overflow the return value on 32-bit operating systems. int PQntuples(const PGresult *res); [/quote] Is there another way to not to overflow the

Re: [GENERAL] What is the proper query

2017-08-22 Thread Igor Korot
le, delete_rule ) ); This is my target. Thank you. > > > On Tue, Aug 22, 2017 at 12:42 PM, Igor Korot <ikoro...@gmail.com> wrote: > >> Hi, David, >> >> On Tue, Aug 22, 2017 at 12:06 PM, David G. Johnston >> <david.g.johns...@gmail.com> wrote: >>

Re: [GENERAL] What is the proper query

2017-08-22 Thread Igor Korot
NO ACTION|NONE 1|0|playersinleague|id|id|NO ACTION|NO ACTION|NONE 1|1|playersinleague|playerid|playerid|NO ACTION|NO ACTION|NONE 2|0|leagues|id|id|NO ACTION|NO ACTION|NONE Can I get something from PostgreSQL? Thank you. > > On Tue, Aug 22, 2017 at 12:42 PM, Igor Korot <ikoro...@gma

Re: [GENERAL] What is the proper query

2017-08-23 Thread Igor Korot
Hi, On Tue, Aug 22, 2017 at 6:18 PM, Igor Korot <ikoro...@gmail.com> wrote: > Melvin et al, > > On Tue, Aug 22, 2017 at 12:55 PM, Melvin Davidson <melvin6...@gmail.com> > wrote: > >> >> >> >> *While the information_schema is useful

Re: [GENERAL] Compatibility of libpg

2017-05-01 Thread Igor Korot
Hi, Jihn, On Mon, May 1, 2017 at 6:33 PM, John R Pierce <pie...@hogranch.com> wrote: > On 5/1/2017 3:08 PM, Igor Korot wrote: >> >> Also - I want to create a project inside my MSVC 2010 solution and >> compile. >> Is there anything I need besides sr

Re: [GENERAL] Compatibility of libpg

2017-05-01 Thread Igor Korot
Hi, John, On May 1, 2017 8:00 PM, "John R Pierce" <pie...@hogranch.com> wrote: On 5/1/2017 4:28 PM, Igor Korot wrote: > Like I said, I don't have dll, I downloaded a source files and would > like to compile > the code myself from the MSVC. > > And I will use

Re: [GENERAL] Compatibility of libpg

2017-05-01 Thread Igor Korot
John, On Mon, May 1, 2017 at 9:38 PM, John R Pierce <pie...@hogranch.com> wrote: > On 5/1/2017 5:44 PM, Igor Korot wrote: >> >> >> But I want to build from MSVC. I already have a solution for it. All I >> need is to create a project inside that solution which wi

Re: [GENERAL] Compatibility of libpg

2017-05-03 Thread Igor Korot
Hi, Magnus, On Wed, May 3, 2017 at 5:20 PM, Magnus Hagander <mag...@hagander.net> wrote: > On Tue, May 2, 2017 at 4:49 AM, Igor Korot <ikoro...@gmail.com> wrote: >> >> John, >> >> On Mon, May 1, 2017 at 9:38 PM, John R Pierce <pie...@hogranch.com> wrot

[GENERAL] PQerrorMessage documentation

2017-05-03 Thread Igor Korot
Hi, ALL, [quote] Nearly all libpq functions will set a message for PQerrorMessage if they fail. Note that by libpq convention, a nonempty PQerrorMessage result can consist of multiple lines, and will include a trailing newline. The caller should not free the result directly. It will be freed when

[GENERAL] Column information

2017-05-03 Thread Igor Korot
Hi, ALL, One more question if I may. [code] draft=# SELECT * FROM information_schema.columns WHERE table_name = 'leagues' AND ordinal_position = 8; table_catalog | table_schema | table_name | column_name | ordinal_position | column_default | is_nullable | data_type | character_maximum_length |

Re: [GENERAL]

2017-05-10 Thread Igor Korot
Hi, guys, On Sun, May 7, 2017 at 1:40 PM, Igor Korot <ikoro...@gmail.com> wrote: > David, > > On Sun, May 7, 2017 at 8:57 AM, David Rowley > <david.row...@2ndquadrant.com> wrote: >> On 8 May 2017 at 00:42, Igor Korot <ikoro...@gmail.com> wrote: >>> Bas

Re: [GENERAL]

2017-05-11 Thread Igor Korot
Adrian et al, On Thu, May 11, 2017 at 9:54 AM, Adrian Klaver <adrian.kla...@aklaver.com> wrote: > On 05/11/2017 06:24 AM, Igor Korot wrote: >> >> Melvin et al, >> > >> >> Now are you saying that the information about the fields in the table can >>

Re: [GENERAL]

2017-05-10 Thread Igor Korot
Hi, John et al, On Wed, May 10, 2017 at 11:02 PM, John R Pierce <pie...@hogranch.com> wrote: > On 5/10/2017 7:45 PM, Igor Korot wrote: >> >> I found >> this:https://wiki.postgresql.org/wiki/Retrieve_primary_key_columns, >> but now I need >> to conne

Re: [GENERAL]

2017-05-11 Thread Igor Korot
Melvin et al, On Thu, May 11, 2017 at 8:50 AM, Melvin Davidson <melvin6...@gmail.com> wrote: > > On Wed, May 10, 2017 at 11:26 PM, Igor Korot <ikoro...@gmail.com> wrote: > >> Hi, John et al, >> >> On Wed, May 10, 2017 at 11:02 PM, John R Pierce <pie...@h

[GENERAL] Remote connection to PostgreSQL

2017-06-19 Thread Igor Korot
Hi, ALL, Is there some magic in order to turn on remote connection to PostgreSQL? There are some extra steps to turn it on for MS SQL and MySQL, so I figured it should be the same for Postgre. Thank you. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to

Re: [GENERAL] Remote connection to PostgreSQL

2017-06-19 Thread Igor Korot
Thx, David. On Mon, Jun 19, 2017 at 12:09 PM, David G. Johnston <david.g.johns...@gmail.com> wrote: > On Mon, Jun 19, 2017 at 9:02 AM, Igor Korot <ikoro...@gmail.com> wrote: >> >> Hi, ALL, >> Is there some magic in order to turn on remote connection to Postg

[GENERAL] libpg sources

2017-05-23 Thread Igor Korot
Hi, ALL, Can I put libpg sources into my project? Or I will have to provide binaries? Thank you. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] libpg sources

2017-05-23 Thread Igor Korot
On Tue, May 23, 2017 at 10:54 AM, John McKown <john.archie.mck...@gmail.com> wrote: > On Tue, May 23, 2017 at 9:39 AM, Albe Laurenz <laurenz.a...@wien.gv.at> > wrote: >> >> Igor Korot wrote: >> >> > Can I put libpg sources into my project? Or I will ha

[GENERAL] Have just libpg installer

2017-05-23 Thread Igor Korot
Hi, ALL, Is it possible to have just libpg installer for main OSes: Win, Linux, Mac? And then just the source code of the client library to compile, since I don't have latest OSX available? Thank you. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to

Re: [GENERAL] Have just libpg installer

2017-05-24 Thread Igor Korot
New thread created. Thank you. On Wed, May 24, 2017 at 10:24 AM, Adrian Klaver <adrian.kla...@aklaver.com> wrote: > On 05/24/2017 07:18 AM, Igor Korot wrote: >> >> On Wed, May 24, 2017 at 10:14 AM, Adrian Klaver >> <adrian.kla...@aklaver.com> wrote: >>&

[GENERAL] libpq Windows Debug binaries

2017-05-24 Thread Igor Korot
Hi, ALL, Does anybody have a ready-to-use solution for libpq binaries for the Debug build on Windows? Thank you. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Have just libpg installer

2017-05-24 Thread Igor Korot
Adrian, On Wed, May 24, 2017 at 12:09 AM, Adrian Klaver <adrian.kla...@aklaver.com> wrote: > On 05/23/2017 08:03 PM, Igor Korot wrote: >> >> Adrian, >> >> On Tue, May 23, 2017 at 10:45 PM, Igor Korot <ikoro...@gmail.com> wrote: >>> >>>

Re: [GENERAL] Have just libpg installer

2017-05-24 Thread Igor Korot
On Wed, May 24, 2017 at 10:14 AM, Adrian Klaver <adrian.kla...@aklaver.com> wrote: > On 05/24/2017 06:58 AM, Igor Korot wrote: >> >> Adrian, >> >> On Wed, May 24, 2017 at 12:09 AM, Adrian Klaver >> <adrian.kla...@aklaver.com> wrote: > &

Re: [GENERAL] Have just libpg installer

2017-05-23 Thread Igor Korot
Adrian, On Tue, May 23, 2017 at 5:52 PM, Adrian Klaver <adrian.kla...@aklaver.com> wrote: > On 05/23/2017 09:12 AM, Igor Korot wrote: >> >> Hi, ALL, >> Is it possible to have just libpg installer for main OSes: Win, Linux, >> Mac? > > > AFAIK there

Re: [GENERAL] Have just libpg installer

2017-05-23 Thread Igor Korot
Adrian, On Tue, May 23, 2017 at 10:45 PM, Igor Korot <ikoro...@gmail.com> wrote: > Adrian, > > On Tue, May 23, 2017 at 7:28 PM, Adrian Klaver > <adrian.kla...@aklaver.com> wrote: >> On 05/23/2017 04:15 PM, Igor Korot wrote: >>> >>> Adrian, >&g

Re: [GENERAL] Have just libpg installer

2017-05-23 Thread Igor Korot
Adrian, On Tue, May 23, 2017 at 7:28 PM, Adrian Klaver <adrian.kla...@aklaver.com> wrote: > On 05/23/2017 04:15 PM, Igor Korot wrote: >> >> Adrian, >> >> On Tue, May 23, 2017 at 5:52 PM, Adrian Klaver >> <adrian.kla...@aklaver.com> wrote: >

Re: [GENERAL] Connection options

2017-06-15 Thread Igor Korot
Hi, Adrian, On Thu, Jun 15, 2017 at 4:13 PM, Adrian Klaver <adrian.kla...@aklaver.com> wrote: > On 06/15/2017 12:02 PM, Igor Korot wrote: >> >> Hi, again, >> >> On Thu, Jun 15, 2017 at 2:59 PM, Igor Korot <ikoro...@gmail.com> wrote: >>> >

Re: [GENERAL] Connection options

2017-06-15 Thread Igor Korot
Hi, again, On Thu, Jun 15, 2017 at 2:59 PM, Igor Korot <ikoro...@gmail.com> wrote: > Hi, ALL, > I'm looking at the documentation at > www.postgresql.org/docs/current/static/libpq-connect.html > section 32.1.2. > > The part for "option" reads: > > [quote]

[GENERAL] Connection options

2017-06-15 Thread Igor Korot
Hi, ALL, I'm looking at the documentation at www.postgresql.org/docs/current/static/libpq-connect.html section 32.1.2. The part for "option" reads: [quote] Specifies command-line options to send to the server... [/quote] Does this mean that if I'm writing a C/C++ program, I shouldn't care

Re: [GENERAL] Connection options

2017-06-15 Thread Igor Korot
Hi, David, On Thu, Jun 15, 2017 at 4:46 PM, David G. Johnston <david.g.johns...@gmail.com> wrote: > On Thu, Jun 15, 2017 at 1:23 PM, Igor Korot <ikoro...@gmail.com> wrote: >> >> And could you clarify on the first part of this? >> From the quote I poste it s

[GENERAL]

2017-05-06 Thread Igor Korot
Hi, I'm trying to retrieve an information about the table. Query is below: SELECT cols.column_name, cols.data_type, cols.character_maximum_length, cols.character_octet_length, cols.numeric_precision, cols.numeric_precision_radix, cols.numeric_scale, cols,column_default, cols.is_nullable,

Re: [GENERAL]

2017-05-07 Thread Igor Korot
Andreas, On Sun, May 7, 2017 at 6:02 AM, Andreas Kretschmer <akretsch...@spamfence.net> wrote: > Igor Korot <ikoro...@gmail.com> wrote: > >> Hi, >> I'm trying to retrieve an information about the table. Query is below: >> >&g

Re: [GENERAL]

2017-05-07 Thread Igor Korot
David, On Sun, May 7, 2017 at 7:57 AM, David Rowley <david.row...@2ndquadrant.com> wrote: > On 7 May 2017 at 16:43, Igor Korot <ikoro...@gmail.com> wrote: >> I'm trying to retrieve an information about the table. Query is below: >> >> SELECT

Re: [GENERAL] Sample in documentation

2017-05-07 Thread Igor Korot
Tom et al, On Sun, May 7, 2017 at 1:09 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Igor Korot <ikoro...@gmail.com> writes: >> On Sat, May 6, 2017 at 8:22 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: >>> I do not see any arrays named "length", nor even

Re: [GENERAL]

2017-05-07 Thread Igor Korot
David, On Sun, May 7, 2017 at 8:57 AM, David Rowley <david.row...@2ndquadrant.com> wrote: > On 8 May 2017 at 00:42, Igor Korot <ikoro...@gmail.com> wrote: >> Basically what I'd like to see is the definition of each column and >> whether this column is >

[GENERAL] Where is the error?

2017-05-06 Thread Igor Korot
Hi, ALL, I am trying to execute following piece of code: [code] std::string query1 = "DECLARE alltables CURSOR SELECT table_schema, table_name FROM information_schema.tables WHERE table_type = 'BASE TABLE' OR table_type = 'VIEW' OR table_type = 'LOCAL TEMPORARY';"; res = PQexec( m_db,

Re: [GENERAL] Where is the error?

2017-05-06 Thread Igor Korot
Hi, Christoph, On May 6, 2017 2:24 PM, "Christoph Moench-Tegeder" <c...@burggraben.net> wrote: ## Igor Korot (ikoro...@gmail.com): > std::string query1 = "DECLARE alltables CURSOR SELECT > table_schema, table_name FROM information_schema.tables WHERE

[GENERAL] Sample in documentation

2017-05-06 Thread Igor Korot
Hi, ALL, I tried to implement the code found in https://www.postgresql.org/docs/current/static/libpq-example.html. On Windows with MSVC 2010 and Liniux with gcc-5.4 it compiled fine. However on OSX 10.8 with: [code] Igors-MacBook-Air:dbhandler igorkorot$ gcc --version Configured with:

Re: [GENERAL] Sample in documentation

2017-05-06 Thread Igor Korot
Hi, Tom, On Sat, May 6, 2017 at 8:22 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Igor Korot <ikoro...@gmail.com> writes: >> I tried to implement the code found in >> https://www.postgresql.org/docs/current/static/libpq-example.html. >> ... >> I am getti

Re: [GENERAL] Column information

2017-05-04 Thread Igor Korot
Hi, Alan, On Thu, May 4, 2017 at 3:18 AM, Alban Hertroys wrote: > >> According to the documentation 'numeric_precision_radix' field should >> indicate what radix the value of 'numeric_precision' is stored. >> >> However, even though the radix is 2, the actual value is 32,

Re: [GENERAL] Column information

2017-05-04 Thread Igor Korot
Hi, guys, On Thu, May 4, 2017 at 10:54 AM, Adrian Klaver wrote: > On 05/04/2017 07:44 AM, Tom Lane wrote: >> >> Adrian Klaver writes: >>> >>> Alright I see that, but why does my example show a >>> numeric_precision_radix of 10? >> >> >>> Is

Re: [GENERAL] Column information

2017-05-04 Thread Igor Korot
David et al, On Thu, May 4, 2017 at 11:27 AM, David G. Johnston <david.g.johns...@gmail.com> wrote: > On Thu, May 4, 2017 at 8:08 AM, Igor Korot <ikoro...@gmail.com> wrote: >> >> Hi, guys, >> >> On Thu, May 4, 2017 at 10:54 AM, Adrian Klaver >> <

[GENERAL] Link errors

2017-05-04 Thread Igor Korot
Hi, [code] 1> Creating library vc_mswuddll\postgres_dll.lib and object vc_mswuddll\postgres_dll.exp 1>libpqd.lib(fe-connect.obj) : error LNK2019: unresolved external symbol __imp__WSAIoctl@36 referenced in function _setKeepalivesWin32 1>libpqd.lib(ip.obj) : error LNK2001: unresolved external

Re: [GENERAL] PQerrorMessage documentation

2017-05-04 Thread Igor Korot
Hi, On Thu, May 4, 2017 at 9:57 PM, Peter Eisentraut <peter.eisentr...@2ndquadrant.com> wrote: > On 5/3/17 21:23, Igor Korot wrote: >> Hi, ALL, >> [quote] >> Nearly all libpq functions will set a message for PQerrorMessage if >> they fail. Note that by libpq conv

[GENERAL] Where is the libpg on OSX?

2017-05-04 Thread Igor Korot
Hi, ALL, [code] Igors-MacBook-Air:/ igorkorot$ find . -name *libpg* find: ./.DocumentRevisions-V100: Permission denied find: ./.fseventsd: Permission denied find: ./.Spotlight-V100: Permission denied find: ./.Trashes: Permission denied

[GENERAL] Compatibility of libpg

2017-05-01 Thread Igor Korot
Hi, I just downloaded a latest (9.6.2) version of libpg. I am wondering - what is the lowest version of PostgreSQL it will be able to connect? Also - I want to create a project inside my MSVC 2010 solution and compile. Is there anything I need besides src/include and src/interface/libpg? Thank

[GENERAL] libpq confusion

2017-09-19 Thread Igor Korot
Hi, ALL, draft=# SELECT 1 FROM abcattbl WHERE abt_tnam = 'leagues'; ?column? -- (0 rows) However running it thru the PQexecParam() I am getting "PGRES_TUPLES_OK" which means that the such record exist. How do I properly check if the record exists from libpq? -- Sent via

Re: [GENERAL] libpq confusion

2017-09-20 Thread Igor Korot
Hi, John, On Wed, Sep 20, 2017 at 12:02 PM, John R Pierce <pie...@hogranch.com> wrote: > On 9/20/2017 6:30 AM, Igor Korot wrote: > > Hi, guys, > > On Wed, Sep 20, 2017 at 12:20 AM, Allan Harvey > <allan.har...@libertyonesteel.com> wrote: > > How do I properly c

Re: [GENERAL] libpq confusion

2017-09-20 Thread Igor Korot
Thx. So it is referring to the command not a "command returning no data". ;-) On Wed, Sep 20, 2017 at 1:42 PM, John R Pierce <pie...@hogranch.com> wrote: > On 9/20/2017 10:34 AM, Igor Korot wrote: > > >From the documentation: > https://www.postgresql.org/docs/9.1/st

  1   2   >