Re: csv copy error

2021-12-29 Thread Guillaume Lelarge
Hi, Le mer. 29 déc. 2021 à 22:08, ourdiaspora a écrit : > Readers, > > Please could anyone help with the following error produced: > > " > ERROR: invalid input syntax for integer: "1,m " > CONTEXT: COPY exampletable, line 1, column examplenumber: "1,m " > > The database commands: > > " > CREAT

pg_config header files are missing - Postgres 13 - Amazon Linux 2

2021-12-29 Thread Hasan Marzooq
Hello! We've a web application in play framework which uses Postgres 9.6 with plv8 and uuid-ossp extension. We now want to use Postgres 13 instead of 9.6. To achieve this, I'm trying to install Postgres 13 (on the same host where 9.6 is installed) with plv8 and uuid-ossp extension. PLV8

Re: Find missing data in a column

2021-12-29 Thread john polo
On 12/29/2021 1:16 PM, Adrian Klaver wrote: On 12/29/21 10:10, Rob Sargent wrote: If you want to use psql then: pg_dump.exe" --file="C:\Users\Nightrunner\DOCUMENTS\programming\pg_out\ebird_sptl_all.txt" --host="localhost" --port="5432" --username="postgres" --password --no-owner --no-pr

Re: Default values in functions

2021-12-29 Thread Michael Lewis
On Wed, Dec 29, 2021, 5:31 PM Tom Lane wrote: > The way to do that is to use named parameters and the associated > call syntax, ie something like > > select myfunc(param1 => 42, param3 => 99); > Thanks very much. I have not seen that before. >

Re: Default values in functions

2021-12-29 Thread Tom Lane
Michael Lewis writes: > Thanks sir. It seems unfortunate that there is not a way to indicate > absence of the third parameter if I need to set a value for the fourth > parameter. The way to do that is to use named parameters and the associated call syntax, ie something like select myfunc(param1

Re: Default values in functions

2021-12-29 Thread Tom Lane
Michael Lewis writes: > Understood. My hope is to pass a parameter that gets overridden by the > default so that I can pass other parameters that come after. As David explained, function parameters don't work that way. You could mechanize something like substitute-a-default-for- null-input, but y

Re: Default values in functions

2021-12-29 Thread Michael Lewis
On Wed, Dec 29, 2021, 4:31 PM Tom Lane wrote: > You didn't say what icount() is, but if it's the one from > contrib/intarray, it's STRICT meaning it'll return NULL, > not zero, for a null array input. Thanks for that. Very good to know. (Or IOW, null::int[] is not at all the same thing as arra

Re: Default values in functions

2021-12-29 Thread Michael Lewis
On Wed, Dec 29, 2021, 4:34 PM David G. Johnston wrote: > That isn’t how it works. Absence is what is important. Null is not > absence. As you showed, if you want nulls to be converted to defaults you > can use coalesce. > Thanks sir. It seems unfortunate that there is not a way to indicate ab

Re: Default values in functions

2021-12-29 Thread David G. Johnston
On Wednesday, December 29, 2021, Michael Lewis wrote: > > > If I can somehow pass "use default for this parameter" to functions like I > can for insert statements, then that would be great to know. > > There is not. > > Generally, the use case I am looking at is having a function with a few > re

Re: Default values in functions

2021-12-29 Thread Tom Lane
Michael Lewis writes: > I am on PG 13.4 and found some surprising behavior with default values. Can > anyone give insight why the last two cases (especially the last one) do not > give the result I expected? If I uncomment the line to set pArrayToCheck > with coalesce, then it gives the expected r

Default values in functions

2021-12-29 Thread Michael Lewis
I am on PG 13.4 and found some surprising behavior with default values. Can anyone give insight why the last two cases (especially the last one) do not give the result I expected? If I uncomment the line to set pArrayToCheck with coalesce, then it gives the expected results though. If I can someho

Re: csv copy error

2021-12-29 Thread David G. Johnston
On Wednesday, December 29, 2021, Adrian Klaver wrote: > On 12/29/21 13:08, ourdiaspora wrote: > >> >> " >> \copy exampletable from '/local/path/to/examplefile.csv'; >> " >> > > \copy exampletable from '/local/path/to/examplefile.csv with csv'; > > Right idea though that won’t execute for three

Re: csv copy error

2021-12-29 Thread Adrian Klaver
On 12/29/21 13:08, ourdiaspora wrote: Readers, Please could anyone help with the following error produced: " ERROR: invalid input syntax for integer: "1,m " CONTEXT: COPY exampletable, line 1, column examplenumber: "1,m " The database commands: " CREATE TABLE exampletable (examplenumber sma

csv copy error

2021-12-29 Thread ourdiaspora
Readers, Please could anyone help with the following error produced: " ERROR: invalid input syntax for integer: "1,m " CONTEXT: COPY exampletable, line 1, column examplenumber: "1,m " The database commands: " CREATE TABLE exampletable (examplenumber smallint, exampletitle varchar(500) ); " "

Re: Find missing data in a column

2021-12-29 Thread Alan Hodgson
On Wed, 2021-12-29 at 12:43 -0500, john polo wrote: > I have a database in PostgreSQL 12 on Windows. It has > 8,000,000 > rows.  > I want to copy this database to PostgreSQL 10 on Slackware Linux. I > used > this command to get the data out of the Windows database: > > "C:\Program Files\PostgreSQ

Re: Find missing data in a column

2021-12-29 Thread Adrian Klaver
On 12/29/21 10:10, Rob Sargent wrote: If you want to use psql then: pg_dump.exe" --file="C:\Users\Nightrunner\DOCUMENTS\programming\pg_out\ebird_sptl_all.txt" --host="localhost" --port="5432" --username="postgres" --password --no-owner --no-privileges --dbname="ebird_work" --table="p_lo

Re: Find missing data in a column

2021-12-29 Thread Rob Sargent
> On Dec 29, 2021, at 10:07 AM, Adrian Klaver wrote: > > On 12/29/21 09:43, john polo wrote: >> Hi, >> I have a database in PostgreSQL 12 on Windows. It has > 8,000,000 rows. I >> want to copy this database to PostgreSQL 10 on Slackware Linux. I used this >> command to get the data out of the

Re: Find missing data in a column

2021-12-29 Thread Adrian Klaver
On 12/29/21 09:43, john polo wrote: Hi, I have a database in PostgreSQL 12 on Windows. It has > 8,000,000 rows. I want to copy this database to PostgreSQL 10 on Slackware Linux. I used this command to get the data out of the Windows database: "C:\Program Files\PostgreSQL\12\bin\pg_dump.exe"

Re: Find missing data in a column

2021-12-29 Thread Adrian Klaver
On 12/29/21 09:43, john polo wrote: Hi, I have a database in PostgreSQL 12 on Windows. It has > 8,000,000 rows. I want to copy this database to PostgreSQL 10 on Slackware Linux. I used this command to get the data out of the Windows database: "C:\Program Files\PostgreSQL\12\bin\pg_dump.exe"

Find missing data in a column

2021-12-29 Thread David G. Johnston
On Wednesday, December 29, 2021, john polo wrote: > > I understand this means there is a problem with one or more rows in the > column referenced. This is a column of text. How do I find the error(s) in > question? > It doesn’t actually mean anything…you cannot use the copy command to import the

Find missing data in a column

2021-12-29 Thread john polo
Hi, I have a database in PostgreSQL 12 on Windows. It has > 8,000,000 rows. I want to copy this database to PostgreSQL 10 on Slackware Linux. I used this command to get the data out of the Windows database: "C:\Program Files\PostgreSQL\12\bin\pg_dump.exe" --file="C:\Users\Nightrunner\DOCUMEN

Initial Sync - One Subscriber After The Other vs. Parallel

2021-12-29 Thread Avi Weinberg
Hi All I'm testing logical replication and noticed that when I sync large tables to multiple subscribers, it is synchronizing two large tables out of 4 for subscriber A and then then two tables to subscriber B and continue to toggle between the two subscriptions. It is possible to tell it to c

Re: psql command failing with error "undefined symbol: PQhostaddr"

2021-12-29 Thread Narendra katlamudi
Hey Team, Thanks for quick responses. But yeah, seems on my system Libpq.so* files were not present in the usual library path. After setting LD_LIBRARY_PATH to consider the location about libpg.so*, the psql  command started working. thanks, On Tuesday, 28 December, 2021, 06:23:30 pm IST, Pa