Re: Importing data from CSV into a table with array and composite types

2018-05-19 Thread Pavel Stehule
2018-05-20 7:36 GMT+02:00 a <372660...@qq.com>: > Thank you so much. BTW, may I ask one more question that, how should I > select every first element of the array?? > > I know that "select p[:] from f" will print all element of the p array, > but I probably would want to present result as "select

Re: Importing data from CSV into a table with array and composite types

2018-05-19 Thread a
Thank you so much. BTW, may I ask one more question that, how should I select every first element of the array?? I know that "select p[:] from f" will print all element of the p array, but I probably would want to present result as "select p[:].a from f", but the statement does not work. May

Re: initdb failing (10.4 centos7)

2018-05-19 Thread Michael Nolan
Just call me blind! -- Mike Nolan

Re: initdb failing (10.4 centos7)

2018-05-19 Thread Adrian Klaver
On 05/19/2018 04:06 PM, David G. Johnston wrote: On Saturday, May 19, 2018, Adrian Klaver > wrote: On 05/19/2018 03:44 PM, Michael Nolan wrote: On Sat, May 19, 2018 at 5:23 PM, Adrian Klaver mailto:adrian.kla...@aklaver.com>

initdb failing (10.4 centos7)

2018-05-19 Thread David G. Johnston
On Saturday, May 19, 2018, Adrian Klaver wrote: > On 05/19/2018 03:44 PM, Michael Nolan wrote: > >> >> >> On Sat, May 19, 2018 at 5:23 PM, Adrian Klaver > > wrote: >> >> > >> Then setting up the $DATADIR is on you: >> >> https://www.postgresql.org/docs/10

Re: initdb failing (10.4 centos7)

2018-05-19 Thread Adrian Klaver
On 05/19/2018 03:44 PM, Michael Nolan wrote: On Sat, May 19, 2018 at 5:23 PM, Adrian Klaver mailto:adrian.kla...@aklaver.com>> wrote: Then setting up the $DATADIR is on you: https://www.postgresql.org/docs/10/static/install-short.html

Re: initdb failing (10.4 centos7)

2018-05-19 Thread Adrian Klaver
On 05/19/2018 03:44 PM, Michael Nolan wrote: On Sat, May 19, 2018 at 5:23 PM, Adrian Klaver mailto:adrian.kla...@aklaver.com>> wrote: On 05/19/2018 03:16 PM, Michael Nolan wrote: On Sat, May 19, 2018 at 2:16 PM, Don Seiler mailto:d...@seiler.us>

Re: initdb failing (10.4 centos7)

2018-05-19 Thread Michael Nolan
On Sat, May 19, 2018 at 5:23 PM, Adrian Klaver wrote: > On 05/19/2018 03:16 PM, Michael Nolan wrote: > >> >> >> On Sat, May 19, 2018 at 2:16 PM, Don Seiler > d...@seiler.us>> wrote: >> >> On Sat, May 19, 2018 at 2:10 PM, Michael Nolan > > wrote: >> >> init

Re: initdb failing (10.4 centos7)

2018-05-19 Thread Adrian Klaver
On 05/19/2018 03:16 PM, Michael Nolan wrote: On Sat, May 19, 2018 at 2:16 PM, Don Seiler > wrote: On Sat, May 19, 2018 at 2:10 PM, Michael Nolan mailto:htf...@gmail.com>> wrote: initdb is failing on Centos 7 with 10.4 because the install procedure d

Re: initdb failing (10.4 centos7)

2018-05-19 Thread Michael Nolan
On Sat, May 19, 2018 at 2:16 PM, Don Seiler wrote: > On Sat, May 19, 2018 at 2:10 PM, Michael Nolan wrote: > >> initdb is failing on Centos 7 with 10.4 because the install procedure >> does not change the ownership of the /usr/local/pgsql directory to >> postgres. >> >> Changing the ownership fi

Re: postgres=# VACUUM FULL pg_statistic => ERROR: missing chunk number 0 for toast value .. in pg_toast_2619

2018-05-19 Thread Justin Pryzby
On Sat, May 19, 2018 at 02:39:26PM -0400, Tom Lane wrote: > Hm, so was the timeout error happening every time through on that table, > or just occasionally, or did you provoke it somehow? I'm wondering how > your 9s timeout relates to the expected completion time. I did not knowingly provoke it :

Re: initdb failing (10.4 centos7)

2018-05-19 Thread Don Seiler
On Sat, May 19, 2018 at 2:10 PM, Michael Nolan wrote: > initdb is failing on Centos 7 with 10.4 because the install procedure does > not change the ownership of the /usr/local/pgsql directory to postgres. > > Changing the ownership fixes the problem, but the install procedure should > do this. >

Re: initdb failing (10.4 centos7)

2018-05-19 Thread Adrian Klaver
On 05/19/2018 12:10 PM, Michael Nolan wrote: initdb is failing on Centos 7 with 10.4 because the install procedure does not change the ownership of the /usr/local/pgsql directory to postgres. Changing the ownership fixes the problem, but the install procedure should do this. Did you follow

initdb failing (10.4 centos7)

2018-05-19 Thread Michael Nolan
initdb is failing on Centos 7 with 10.4 because the install procedure does not change the ownership of the /usr/local/pgsql directory to postgres. Changing the ownership fixes the problem, but the install procedure should do this. -- Mike Nolan

Re: postgres=# VACUUM FULL pg_statistic => ERROR: missing chunk number 0 for toast value .. in pg_toast_2619

2018-05-19 Thread Tom Lane
Justin Pryzby writes: > [pryzbyj@database ~]$ while :; do for db in `psql postgres -Atc "SELECT > datname FROM pg_database WHERE datallowconn"`; do for t in pg_statistic > pg_attrdef pg_constraint; do echo "$db.$t..."; > PGOPTIONS=-cstatement_timeout='9s' psql $db -qc "VACUUM FULL $t"; done; do

Re: View Filtered Rows technique

2018-05-19 Thread David G. Johnston
On Sat, May 19, 2018 at 9:55 AM, Dale Seaburg wrote: > I am looking for a convenient way to search a specific table where a > specific column contains a string like this: "\2016\\" (within the > quote-marks, but not including the quote-marks). I haven't found anything > in the documentation

View Filtered Rows technique

2018-05-19 Thread Dale Seaburg
I am looking for a convenient way to search a specific table where a specific column contains a string like this: "\2016\    \" (within the quote-marks, but not including the quote-marks).  I haven't found anything in the documentation (8.4.5).  I am using the View Data | View Filtered Rows met

Re: postgres=# VACUUM FULL pg_statistic => ERROR: missing chunk number 0 for toast value .. in pg_toast_2619

2018-05-19 Thread Justin Pryzby
On Sat, May 19, 2018 at 11:24:57AM -0500, Justin Pryzby wrote: > On Sat, May 19, 2018 at 11:08:23AM -0400, Tom Lane wrote: > > Justin Pryzby writes: > > > I'll defer fixing this for awhile in case someone wants me to save a copy > > > of > > > the relation/toast/index. From last time, I recall t

Re: postgres=# VACUUM FULL pg_statistic => ERROR: missing chunk number 0 for toast value .. in pg_toast_2619

2018-05-19 Thread Justin Pryzby
On Sat, May 19, 2018 at 11:08:23AM -0400, Tom Lane wrote: > Justin Pryzby writes: > > I'll defer fixing this for awhile in case someone wants me to save a copy of > > the relation/toast/index. From last time, I recall this just needs the > > right > > combination of REINDEX/VACUUM/ANALYZE, and t

Re: postgres=# VACUUM FULL pg_statistic => ERROR: missing chunk number 0 for toast value .. in pg_toast_2619

2018-05-19 Thread Tom Lane
Justin Pryzby writes: > I'll defer fixing this for awhile in case someone wants me to save a copy of > the relation/toast/index. From last time, I recall this just needs the right > combination of REINDEX/VACUUM/ANALYZE, and the only complication was me > needing to realize the right combination

postgres=# VACUUM FULL pg_statistic => ERROR: missing chunk number 0 for toast value .. in pg_toast_2619

2018-05-19 Thread Justin Pryzby
I recall seeing various discussions hoping that it'd been finally fixed - Just wanted to report that this has happened now under postgres 10.4. It looks like this is not related to: 0408e1ed599b06d9bca2927a50a4be52c9e74bb9 which is for "unexpected chunk number" (?) Note that this is on the postgr