Re: Syntax error when combining --set and --command has me stumped

2022-07-28 Thread Adrian Klaver
mmands to psql's standard input, either using echo as illustrated above, or via a shell here-document, for example: psql < \set num 42 > SELECT :num; > EOF Null display is "NULL". ?column? -- 42 (1 row) -- Adrian Klaver adrian.kla...@aklaver.com

Re: Connecting to postgres on OSX from Swift using PostgresClientKit

2022-07-31 Thread Adrian Klaver
connecting and hopefully someone can put me on the right track. Thanks Howard Cole Selestial.com  Maybe add config.host = "localhost"? Thanks, tried localhost, 127.0.0.1 and ::128. No joy What error do you get in the above cases? -- Adrian Klaver adrian.kla...@aklaver.com

Re: Connecting to postgres on OSX from Swift using PostgresClientKit

2022-07-31 Thread Adrian Klaver
On 7/31/22 17:27, howardn...@selestial.com wrote: On 2022-08-01 01:04, Adrian Klaver wrote: On 7/31/22 16:53, howardn...@selestial.com wrote: On 2022-07-31 23:42, Rob Sargent wrote: 2022-08-01T00:20:18.530Z Connection-1 finer] Created socket [2022-08-01T00:20:18.532Z Connection-1 fine

Re: Copying records from TABLE_A to TABLE_B (in the same database)

2022-08-02 Thread Adrian Klaver
ble_b FROM '/tmp/table_a.tsv' WITH (FORMAT BINARY); Is there a faster/better way? Does table_a have existing records? If so do you care if there are duplicates? How large a data set are you talking about? -- Adrian Klaver adrian.kla...@aklaver.com

Re: "Missing" column in Postgres logical replication update message

2022-08-03 Thread Adrian Klaver
ed also on StackOverflow: https://stackoverflow.com/questions/73222107/missing-column-in-postgres-logical-replication-update-message <https://stackoverflow.com/questions/73222107/missing-column-in-postgres-logical-replication-update-message> -- Adrian Klaver adrian.kla...@aklaver.com

Re: "Missing" column in Postgres logical replication update message

2022-08-03 Thread Adrian Klaver
hat do not. On Wed, Aug 3, 2022 at 10:47 AM Adrian Klaver <mailto:adrian.kla...@aklaver.com>> wrote: On 8/3/22 06:50, Kevin Martin wrote: > We have a replication slot set up on a database in Postgres 12.8. For > one of the tables, when a row is created, we see

Re: Upgrading from 12.3 to 12.11

2022-08-03 Thread Adrian Klaver
existing instance(12.3) will need to be stopped and then the new install for the 12.11 done and then start it. That means there will be point where the connections will be lost. How big an issue would that be? Sent from my Verizon, Samsung Galaxy smartphone -- Adrian Klaver ad

Re: Upgrading from 12.3 to 12.11

2022-08-03 Thread Adrian Klaver
cause a mess. Also how much downtime can you tolerate? Sent from my Verizon, Samsung Galaxy smartphone Original message From: Adrian Klaver Date: 8/3/22 1:57 PM (GMT-05:00) To: zaphod61 , pgsql-general@lists.postgresql.org Subject: Re: Upgrading from 12.3 to 12.11 On 8

Re: Upgrading from 12.3 to 12.11

2022-08-03 Thread Adrian Klaver
ns of Postgres. Mixing that up would be a mess. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Purpose of DEFERRABLE _and_ INITIALLY DEFERRED foreign key constraint checking?

2022-08-03 Thread Adrian Klaver
(A naive interpretation just by looking at the clause words led me to think that INITIALLY DEFERRED would not check record validity when a constraint is *added* to a table, but obviously that's wrong too.) -- Angular momentum makes the world go 'round. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Purpose of DEFERRABLE _and_ INITIALLY DEFERRED foreign key constraint checking?

2022-08-03 Thread Adrian Klaver
On 8/3/22 18:13, Ron wrote: On 8/3/22 20:02, Adrian Klaver wrote: On 8/3/22 17:30, Ron wrote: AWS RDS Postgresql 12.10 And https://www.postgresql.org/docs/12/sql-set-constraints.html seems to say that SET CONSTRAINTS can make DEFERRABLE FKs temporarily not deferrable. What's the

Re: Surprisingly forgiving behavior when a case expression is terminated with "end case"

2022-08-10 Thread Adrian Klaver
mn labels (for example, SELECT 55 AS CHECK, even though CHECK is a reserved key word)." -- Adrian Klaver adrian.kla...@aklaver.com

Re: Why is DEFAULT much faster than UPDATE?

2022-08-10 Thread Adrian Klaver
statement and the result stored in the table's metadata. That value will be used for the column for all existing rows. If no DEFAULT is specified, NULL is used. In neither case is a rewrite of the table required." Fiddle: https://dbfiddle.uk/?rdbms=postgres_14&fiddle=56595e8ee3

Re: Could not load server certificate file "server.crt": No such file or directory.

2022-08-12 Thread Adrian Klaver
resql.conf to verify. If you don't want SSL on then set to off. If you want it on and need a certificate see: https://www.postgresql.org/docs/14/ssl-tcp.html#SSL-CERTIFICATE-CREATION Thanks, Howard. -- Adrian Klaver adrian.kla...@aklaver.com

Re: plpython questions

2022-08-16 Thread Adrian Klaver
On 8/16/22 16:15, Ted Toth wrote: Is this the right list to ask questions about plpython? If not what would be the best list or git repo to ask questions related to plpython? This is the correct list. plpython(3)u is part of the core code for Postgres. Ted -- Adrian Klaver adrian.kla

Re: plpython/python string formatting

2022-08-16 Thread Adrian Klaver
format('CREATE INDEX %s ON %s USING (column_name)' % (index_name, table_name)) Ted -- Adrian Klaver adrian.kla...@aklaver.com

Re: plpython/python string formatting

2022-08-16 Thread Adrian Klaver
; ON "test_tbl" (id) DO \d test_tbl Table "public.test_tbl" Column | Type | Collation | Nullable | Default ----+-+---+--+- id | integer | | | Indexes: "test" btree (id) Ted -- Adrian Klaver adrian.kla...@aklaver.com

Re: Regarding availability of 32bit client drivers for postgresql 13/14

2022-08-16 Thread Adrian Klaver
10.12.1 client ? Thanks & Regards, Aravind Phaneendra CICS TX and TXSeries Development & L3 Support India Systems Development Labs IBM Systems -- Adrian Klaver adrian.kla...@aklaver.com

Re: Sub:column "" is of type bigint but expression is of type character varying

2022-08-17 Thread Adrian Klaver
e same for both tables.  column "*ticket_purchase_no*" is of type bigint but expression is of type character varying Regards A.Rama Krishnan -- Adrian Klaver adrian.kla...@aklaver.com

Re: Different execution plan between PostgreSQL 8.2 and 12.5

2022-08-17 Thread Adrian Klaver
On 8/17/22 20:01, gzh wrote: Hi, I have had a Perl Website working for 7 years and have had no problems until a few weeks ago I replaced my database server with a newer one. Did you run ANALYZE on the 12.5 server after restoring the data to it? gzh -- Adrian Klaver adrian.kla

Re: Different execution plan between PostgreSQL 8.2 and 12.5

2022-08-18 Thread Adrian Klaver
select   count(*) from crew_base      left join crew_base as crew_base_introduced on crew_base.introduced_by=crew_base_introduced.crewid where crew_base.status = '1'; -- Adrian Klaver adrian.kla...@aklaver.com

Re: Fwd: Data caching

2022-08-18 Thread Adrian Klaver
ut none of them do this. Thanks. Anant. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Support for dates before 4713 BC

2022-08-21 Thread Adrian Klaver
k and pointers are very welcome, Alex -- Alexander Watzinger Austrian Academy of Sciences Austrian Centre for Digital Humanities and Cultural Heritage alexander.watzin...@oeaw.ac.at | www.oeaw.ac.at/acdh -- Adrian Klaver adrian.kla...@aklaver.com

Re: Corrupted Postgresql Microsoft Binaries

2022-08-23 Thread Adrian Klaver
where else can I get the files? There are the installers: https://www.enterprisedb.com/downloads/postgres-postgresql-downloads -- Adrian Klaver adrian.kla...@aklaver.com

Re: Corrupted Postgresql Microsoft Binaries

2022-08-24 Thread Adrian Klaver
e)? Show commands/steps used in each case. Which file(s) exactly? What is the complete error message? -- Adrian Klaver adrian.kla...@aklaver.com

Re: Corrupted Postgresql Microsoft Binaries

2022-08-24 Thread Adrian Klaver
install it will show up in the context menu when you right click on a compressed file. I was able to successfully unzip files in powershell using the command below. image.png On Wed, Aug 24, 2022 at 2:40 PM Adrian Klaver <mailto:adrian.kla...@aklaver.com>> wrote: On 8/24/22 0

Re: Corrupted Postgresql Microsoft Binaries

2022-08-24 Thread Adrian Klaver
png I was able to successfully unzip files in powershell using the command below. image.png I sent an email to: webmas...@enterprisedb.com explaining the issue. Is there a reason you can't use the installer? Can you do what you need with the files unzipped in PowerShell? -- Adrian Kl

Re: Two questions about "pg_constraint"

2022-08-24 Thread Adrian Klaver
from pg_constraint is pg_get_expr(conbin, conrelid). pg_get_constraintdef() is also a useful alternative. " -- Adrian Klaver adrian.kla...@aklaver.com

Re: Two questions about "pg_constraint"

2022-08-24 Thread Adrian Klaver
On 8/24/22 13:17, Adrian Klaver wrote: On 8/24/22 13:11, Bryn Llewellyn wrote: Ad hoc queries in my PG 11.9 env show results like « (v = lower(v)) » in this column for my tables. This is useful information. But the PG 14 version of "pg_constraint" has no such column (and nor do

Re: Two questions about "pg_constraint"

2022-08-24 Thread Adrian Klaver
7;pk1'; conname | connamespace -+-- pk1 | 2200 pk1 |59706 From: https://www.postgresql.org/docs/current/catalog-pg-constraint.html conname name Constraint name (not necessarily unique!) So connamespace makes it unique. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Corrupted Postgresql Microsoft Binaries

2022-08-24 Thread Adrian Klaver
versions to multiple machines using the binaries. As I understand it you can unzip them and the issue is just with the 'Extract All' process. In other words they are valid except for the one use case. On Wed, Aug 24, 2022 at 4:09 PM Adrian Klaver <mailto:adrian.kla...@aklaver.com&g

Re: Corrupted Postgresql Microsoft Binaries

2022-08-24 Thread Adrian Klaver
ults where: From MS the usual: a) It's your problem b) Upgrade c) Reboot. From others: a) The builtin unzip program is buggy don't use. b) Use just about any other program. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Two questions about "pg_constraint"

2022-08-24 Thread Adrian Klaver
ps://bucardo.org/postgres_all_versions Then you can search on the page. I confirmed that "pg_get_expr(conbin, conrelid)" shows « (v = lower(v)) » for my example table. -- Adrian Klaver adrian.kla...@aklaver.com

Re: pg_dump without setting search_path

2022-08-24 Thread Adrian Klaver
this line in PostgreSQL 12.5? No for this reason: https://wiki.postgresql.org/wiki/A_Guide_to_CVE-2018-1058:_Protect_Your_Search_Path regards, tom lane -- Adrian Klaver adrian.kla...@aklaver.com

Re: Information_schema.table_constraints

2022-08-25 Thread Adrian Klaver
://www.postgresql.org/docs/current/infoschema-table-constraints.html "The view table_constraints contains all constraints belonging to tables that the current user owns or has some privilege other than SELECT on." Thanks -- Adrian Klaver adrian.kla...@aklaver.com

Re: Corrupted Postgresql Microsoft Binaries

2022-08-29 Thread Adrian Klaver
icrosoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=powershell>). Note that the files were successfully unzipped in Powershell v7 without making any changes. On Wed, Aug 24, 2022 at 5:36 PM Adrian Klaver -- Adrian Klaver adrian.kla...@aklaver.com

Re: Bind Parameter is Too Big

2022-09-01 Thread Adrian Klaver
the message. This message may also be subject to disclosure under the North Dakota Open Records Laws. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Bind Parameter is Too Big

2022-09-01 Thread Adrian Klaver
database uses UTF8 And the code that pipes the data? Matt Kluzak Technology Director North Dakota Public Service Commission 600 E Boulevard Ave Dept 408 13th Floor Bismarck, ND 58505-0480 Phone: 701-328-4075 -- Adrian Klaver adrian.kla...@aklaver.com

Re: How to make PostreSQL utilities honor home directories?

2022-09-01 Thread Adrian Klaver
is /var/lib/pgsql . Reading through the `psql --help` options and searching on the web is not turning up any hits. We are also observing the errors when using pg_isready . How to make PostreSQL utilities honor home directories? Thanks in advance. Jeff -- Adrian Klaver adrian.kla...@aklaver.com

Re: How to make PostreSQL utilities honor home directories?

2022-09-01 Thread Adrian Klaver
have access to my stuff. The postgres user's home directory is /var/lib/pgsql . Reading through the `psql --help` options and searching on the web is not turning up any hits. We are also observing the errors when using pg_isready . How to make PostreSQL utilities honor home directories? Th

Re: How to make PostreSQL utilities honor home directories?

2022-09-01 Thread Adrian Klaver
ostgres all scram- sha-256 if you want password protection. Jeff [1] https://www.postgresql.org/message-id/797232.1662075573%40sss.pgh.pa.us [2] https://github.com/DefectDojo/godojo -- Adrian Klaver adrian.kla...@aklaver.com

Re: Determine if a user and database are available

2022-09-02 Thread Adrian Klaver
an track in the logs. -- Adrian Klaver adrian.kla...@aklaver.com

Re: log_min_messages = warning

2022-09-06 Thread Adrian Klaver
il and any attachments. Certain required legal entity disclosures can be accessed on our website: https://www.thomsonreuters.com/en/resources/disclosures.html -- Adrian Klaver adrian.kla...@aklaver.com

Re: [Beginner Question]Where can I get the source of hstore?

2022-09-10 Thread Adrian Klaver
link to me? Search term "postgresql hstore source", first item returned: https://doxygen.postgresql.org/hstore_8h_source.html I am not seeing a bright future for your research, if the effort put into so far is any indication. Thanks in advance! Yours, BeginnerC. -- Adri

Re: Postgresql acid components

2022-09-13 Thread Adrian Klaver
ocs/14/sql-altersubscription.html https://www.postgresql.org/docs/14/sql-alterdatabase.html Your best bet is to look at the commands listed here: https://www.postgresql.org/docs/14/sql-commands.html to check before using for first time. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Mysterious performance degradation in exceptional cases

2022-09-14 Thread Adrian Klaver
mple being swapped out or whatever). Any ideas about this? matthias -- Adrian Klaver adrian.kla...@aklaver.com

Re: Mysterious performance degradation in exceptional cases

2022-09-15 Thread Adrian Klaver
On 9/14/22 22:33, Matthias Apitz wrote: El día miércoles, septiembre 14, 2022 a las 07:19:31a. m. -0700, Adrian Klaver escribió: On 9/14/22 01:31, Matthias Apitz wrote: Where is the inter library software, in your application or are you reaching out to another application? The above 

Re: get user info on log

2022-09-15 Thread Adrian Klaver
ing different then you will need to provide a more detailed description of what that is. Thanks Marcos -- Adrian Klaver adrian.kla...@aklaver.com

Re: get user info on log

2022-09-17 Thread Adrian Klaver
5 PDT-0STATEMENT: select 1/0; Ganesh is looking for psql- not psql-, in this case psql-aklaver. Regards, Ganesh Korde. On Fri, 16 Sep 2022, 6:31 pm Marcos Pegoraro, <mailto:mar...@f10.com.br>> wrote: Em qui., 15 de set. de 2022 às 12:59, Adrian Klaver mailto:adrian.kla.

Re: get user info on log

2022-09-17 Thread Adrian Klaver
On 9/16/22 06:00, Marcos Pegoraro wrote: Em qui., 15 de set. de 2022 às 12:59, Adrian Klaver mailto:adrian.kla...@aklaver.com>> escreveu: test(5432)=# set role maura; ERROR:  role "maura" does not exist test(5432)=# SET SESSION AUTHORIZATION 'maura';

Re: Mysterious performance degradation in exceptional cases

2022-09-18 Thread Adrian Klaver
On 9/18/22 02:30, Matthias Apitz wrote: El día jueves, septiembre 15, 2022 a las 08:40:24a. m. -0700, Adrian Klaver escribió: On 9/14/22 22:33, Matthias Apitz wrote: El día miércoles, septiembre 14, 2022 a las 07:19:31a. m. -0700, Adrian Klaver escribió: On 9/14/22 01:31, Matthias Apitz

Re: Mysterious performance degradation in exceptional cases

2022-09-18 Thread Adrian Klaver
le in that library. In short: no way. How is it random? Are you saying that the ESQL/C session does not 'know' the search is coming from the ILL connection? Thanks matthias -- Adrian Klaver adrian.kla...@aklaver.com

Re: Where's the doc for "array()" — as in "select array(values (17), (42))"

2022-09-18 Thread Adrian Klaver
Constructors "It is also possible to construct an array from the results of a subquery. In this form, the array constructor is written with the key word ARRAY followed by a parenthesized (not bracketed) subquery. For example: SELECT ARRAY(SELECT oid FROM pg_proc WHERE proname LIKE 'bytea%'); ..." -- Adrian Klaver adrian.kla...@aklaver.com

Re: Where's the doc for "array()" — as in "select array(values (17), (42))"

2022-09-18 Thread Adrian Klaver
a select statement—and in general together with "group by". Lack of an explicit GROUP BY falls through to an implied one: https://www.postgresql.org/docs/current/sql-select.html#SQL-GROUPBY "If there are aggregate functions but no GROUP BY clause, the query is treated as

Re: Where's the doc for "array()" — as in "select array(values (17), (42))"

2022-09-19 Thread Adrian Klaver
Why is the "array()" constructor not found in "pg_proc"? After all, section 4.2.12 refers to "array_agg()" as a constructor. And that *is* found in "pg_proc". The only place I see array_agg in 4.2.x is 4.2.7. Aggregate Expressions. -- Adrian Klaver adrian.kla...@aklaver.com

Re: I slipped up so that no existing role allows connection. Is rescue possible?

2022-09-19 Thread Adrian Klaver
magic—as a little memo for me: postgres --single -D /usr/local/var/postgres postgres The world that the "backend> " prompt opened up for me was rather basic. Which is documented here: https://www.postgresql.org/docs/current/app-postgres.html#APP-POSTGRES-SINGLE-USER --

Re: problem with on conflict / do update using psql 14.4

2022-09-24 Thread Adrian Klaver
function that inserts the conflicts to another table and then UNION that table to the primary for query purposes. -- Adrian Klaver adrian.kla...@aklaver.com

Re: fully qualified domain names and .pgpass

2022-10-04 Thread Adrian Klaver
gpass file: foobar:5432:postgres:Allegedly.Strong.Password foobar.example.com:5432:postgres:Allegedly.Strong.Password But I'd rather have only one line.  Is there any way to do that? Would a service file: https://www.postgresql.org/docs/14/libpq-pgservice.html work? -- Adrian Klaver adrian.kla...@aklaver.com

Re: ('dog$house' = quote_ident('dog$house')) is surprisingly FALSE

2022-10-05 Thread Adrian Klaver
---+- text | "$dog" The way I see is if it where an actual identifier then this: select * from quote_ident('$dog'); quote_ident - "$dog" would be equal to this: select * from "$dog"; n --- -- Adrian Klaver adrian.kla...@aklaver.com

Re: pg_restore creates public schema?

2022-10-06 Thread Adrian Klaver
going EOL) server 2) Set up a 9.6.24 instance somewhere you have control. 3) pg_restore to it. 4) Then use pg_dump 13.8 on the new instance. -- Adrian Klaver adrian.kla...@aklaver.com

Re: pg_restore creates public schema?

2022-10-06 Thread Adrian Klaver
those hoops, yet you can move the data off site with no issue? -- Angular momentum makes the world go 'round. -- Adrian Klaver adrian.kla...@aklaver.com

Re: pg_restore creates public schema?

2022-10-06 Thread Adrian Klaver
On 10/6/22 2:03 PM, Ron wrote: On 10/6/22 14:35, Adrian Klaver wrote: On 10/6/22 09:46, Ron wrote: On 10/6/22 10:20, Tom Lane wrote: Because installing new software on production servers requires hurdles (Service Now change ticket approved by the application support manager, Delivery

Re: pg_restore creates public schema?

2022-10-06 Thread Adrian Klaver
On 10/6/22 1:54 PM, Ron wrote: On 10/6/22 14:32, Adrian Klaver wrote: On 10/6/22 10:46, Christophe Pettus wrote: On Oct 6, 2022, at 10:44, Ron wrote: Sadly, that VM doesn't have nearly enough disk space to hold the backup folder. Use file mode, and stream the output via scp/ssh

Re: pg_restore creates public schema?

2022-10-07 Thread Adrian Klaver
#x27;round. -- Adrian Klaver adrian.kla...@aklaver.com

Re: ('dog$house' = quote_ident('dog$house')) is surprisingly FALSE

2022-10-07 Thread Adrian Klaver
iage(writing for writing's sake) takes away from any argument you are trying to make. Less is more. I have come to the point where I ignore most of what you write as it really does not go anywhere other then make noise. -- Adrian Klaver adrian.kla...@aklaver.com

Re: pg_restore creates public schema?

2022-10-08 Thread Adrian Klaver
using psql: https://fedingo.com/how-to-connect-to-postgresql-server-via-ssh-tunnel/ -- Adrian Klaver adrian.kla...@aklaver.com

Re: Same query, same data different plan

2022-10-10 Thread Adrian Klaver
above link, an answer to this question will be nothing more then guesses. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Same query, same data different plan

2022-10-10 Thread Adrian Klaver
n the tables or indexes, causing cost estimates to change. I will look into that and a couple of other ideas I got from this list.     regards, tom lane Thanks kostas -- Adrian Klaver adrian.kla...@aklaver.com

Exponentiation confusion

2022-10-13 Thread Adrian Klaver
power(10, -18::numeric); power 0. Why is the cast throwing off the result? -- Adrian Klaver adrian.kla...@aklaver.com

Re: pg_upgrade to 15 fails on Windows because of xml_is_well_formed()

2022-10-13 Thread Adrian Klaver
nsion days. Regards Thomas -- Adrian Klaver adrian.kla...@aklaver.com

Re: Where to flag an issue with EDB's PG15 Windows installer?

2022-10-14 Thread Adrian Klaver
/issues in a message to this mailing list and see if someone from EDB picks it up. Thanks, Anthony DeBarros -- Adrian Klaver adrian.kla...@aklaver.com

Re: Zheap Tech Problem

2022-10-14 Thread Adrian Klaver
ap&ia=web jacktby jack...@gmail.com <https://maas.mail.163.com/dashi-web-extend/html/proSignature.html?ftlId=1&name=jacktby&uid=jacktby%40gmail.com&iconUrl=https%3A%2F%2Fmail-online.nosdn.127.net%2Fsm0518731fe949f1e7d47bc70ba230c8b8.jpg&items=%5B%22jacktby%40gmail.com%22%5

Re: Attaching database

2022-10-15 Thread Adrian Klaver
the purposes of making the data visible in the foreign tables in finance. 4) The client you did this did not 'leave' the finance database, so the only information_schema you have access to is in the finance database. I hope now its clearer. Thank you. David J. --

Re: Attaching database

2022-10-15 Thread Adrian Klaver
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 (finance) DB, which made the (finance) catalog current. Then I "opened a second connection" to (finance_2021), which

Re: Attaching database

2022-10-15 Thread Adrian Klaver
e it is the "main" connection. -- Adrian Klaver adrian.kla...@aklaver.com

Re: could not find shared library for Python

2022-10-17 Thread Adrian Klaver
47bc70ba230c8b8.jpg&items=%5B%22jacktby%40gmail.com%22%5D> -- Adrian Klaver adrian.kla...@aklaver.com

Re: could not find shared library for Python

2022-10-17 Thread Adrian Klaver
interpreter? So type python and hit enter. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Column value derived from generated column in INSERT?

2022-10-19 Thread Adrian Klaver
cannot be referenced from this part of the query. insert into t (y) values (x * 2); ERROR: column "x" does not exist LINE 1: insert into t (y) values (x * 2); ^ HINT: There is a column named "x" in table "t", but it cannot be referenced from this part of the query. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Column value derived from generated column in INSERT?

2022-10-19 Thread Adrian Klaver
On 10/19/22 12:48, Mark Raynsford wrote: On 2022-10-19T12:43:31 -0700 Adrian Klaver wrote: HINT: There is an entry for table "t", but it cannot be referenced from this part of the query. HINT: There is a column named "x" in table "t", but it cannot be referenc

Re: Column value derived from generated column in INSERT?

2022-10-19 Thread Adrian Klaver
On 10/19/22 12:58 PM, Adrian Klaver wrote: On 10/19/22 12:48, Mark Raynsford wrote: On 2022-10-19T12:43:31 -0700 Adrian Klaver wrote: HINT:  There is an entry for table "t", but it cannot be referenced from this part of the query. HINT:  There is a column named "x"

Re: pg_restore 12 "permission denied for schema" errors

2022-10-20 Thread Adrian Klaver
u run without --jobs? 4) What user are you running the pg_restore as? 5) Why the --no-role-passwords in the pg_dump? -- Adrian Klaver adrian.kla...@aklaver.com

Re: Asking for existence of a GUI frame work similar to Oracle APEX for PostgreSQL

2022-10-21 Thread Adrian Klaver
ndest regards, Dionisis Kontominas -- Adrian Klaver adrian.kla...@aklaver.com

Re: Asking for existence of a GUI frame work similar to Oracle APEX for PostgreSQL

2022-10-21 Thread Adrian Klaver
retain the Tomcat+ORDS portion of the stack? Thank you for your time! Kindest regards, Dionisis Kontominas -- Adrian Klaver adrian.kla...@aklaver.com

Re: possible bug

2022-10-21 Thread Adrian Klaver
be wrong. Please help me! I suspect an index problem. Have you tried reindexing the source table, kap.course if I am following correctly. Have there been any issues with the database lately, e.g. crash or other significant event? The actual test view looks like this: -- Adrian Klaver

Re: Asking for existence of a GUI frame work similar to Oracle APEX for PostgreSQL

2022-10-21 Thread Adrian Klaver
y head I can't come with a replacement. Thank you for your response! On Fri, 21 Oct 2022 at 19:36, Adrian Klaver <mailto:adrian.kla...@aklaver.com>> wrote: On 10/21/22 10:25 AM, Dionisis Kontominas wrote: > Hello Adam, > >     Thank y

Re: possible bug

2022-10-21 Thread Adrian Klaver
ost. Also to trim out material which was covered in previous posts. -- Adrian Klaver adrian.kla...@aklaver.com

Re: High CPU usage

2022-10-22 Thread Adrian Klaver
any kind. This is a single instance server which alows certification login only. I appreciate any help to figure this out. Thanks & Regards, Ertan -- Adrian Klaver adrian.kla...@aklaver.com

Re: pg_restore 12 "permission denied for schema" errors

2022-10-22 Thread Adrian Klaver
On 10/20/22 14:34, Ron wrote: On 10/20/22 10:02, Adrian Klaver wrote: On 10/20/22 06:20, Ron wrote: On 10/20/22 00:12, Tom Lane wrote: I ran "pg_dumpall --globals-only --no-role-passwords" on the source instance, and applied it to the new instance before doing the pg_restore. I

Re: pg_restore 12 "permission denied for schema" errors

2022-10-22 Thread Adrian Klaver
On 10/22/22 09:41, Ron wrote: On 10/22/22 11:20, Adrian Klaver wrote: On 10/20/22 14:34, Ron wrote: On 10/20/22 10:02, Adrian Klaver wrote: On 10/20/22 06:20, Ron wrote: On 10/20/22 00:12, Tom Lane wrote: I was afraid you were going to say that. The work-around is to: pg_dump $SRCDB

Re: pg_restore 12 "permission denied for schema" errors

2022-10-22 Thread Adrian Klaver
On 10/22/22 14:02, Ron wrote: On 10/22/22 12:00, Adrian Klaver wrote: On 10/22/22 09:41, Ron wrote: On 10/22/22 11:20, Adrian Klaver wrote: On 10/20/22 14:34, Ron wrote: On 10/20/22 10:02, Adrian Klaver wrote: On 10/20/22 06:20, Ron wrote: On 10/20/22 00:12, Tom Lane wrote: I was

Re: pg_restore 12 "permission denied for schema" errors

2022-10-22 Thread Adrian Klaver
On 10/22/22 14:45, Ron wrote: On 10/22/22 16:29, Adrian Klaver wrote: To pseudo for me. What file exactly is: pg_restore --jobs=X --no-owner $NEWDB restoring? And how was that file created? Knowing this might help get at why the more straight forward method does not work. This is what

Re: How to find an oid that's not uesd now?

2022-10-23 Thread Adrian Klaver
ation needed: 1) Postgres version? 2) What client reported that error? 3) What is the index creation statement you used? -- Adrian Klaver adrian.kla...@aklaver.com

Re: How to load data from CSV into a table that has array types in its columns?

2022-10-26 Thread Adrian Klaver
LICT from here: https://www.postgresql.org/docs/current/sql-insert.html#SQL-ON-CONFLICT insert into table tbl select id, array[fid] from staging_table on conflict(id) DO UPDATE SET fids = array_append(fids, excluded.fid); I would test with a smaller example data set to vetify. -- Adri

Re: Seeking the correct term of art for the (unique) role that is usually called "postgres"—and the mental model that underlies it all

2022-10-26 Thread Adrian Klaver
sr. The package installation set up an OS user postgres that runs the OS side of the operation e.g the server code. It also by default uses that same name as the database superuser when creating a new cluster. This user then owns the SQL side. You can, however, change the SQL 'owner' for new cluster as you did. *Where can I read a nice, linear, soup-to-nuts acount of this whole business that introduces, and that consistently uses, the proper terms of art?* -- Adrian Klaver adrian.kla...@aklaver.com

Re: Seeking the correct term of art for the (unique) role that is usually called "postgres"—and the mental model that underlies it all

2022-10-27 Thread Adrian Klaver
database "usr" and granting "connect" on it to "usr".) Then I could create a new session from the O/S prompt when "whoami" shows "user" with the bare "psql"—just as I could the moment after the PG install finished from the O/S prompt when "whoami" shows "postgres". I did think that I'd tried all this at the outset. But clearly I must've missed one of those steps or done a typo. -- Adrian Klaver adrian.kla...@aklaver.com

Re: "peer" authentication: cannot make "pg_ident.conf" work as I believe that the doc says that it should

2022-10-29 Thread Adrian Klaver
2.168.0.0/16 ident map=omicron pg_ident.conf and pg_hba.conf are two separate files and the only way information gets from the former to the latter is if you explicitly include the map name under METHOD for the the auth line. -- Adrian Klaver adrian.kla...@aklaver.com

Re: How to add a variable to a timestamp.

2022-10-29 Thread Adrian Klaver
3) AS h(i); E. Sent with Proton Mail <https://proton.me/> secure email. -- Adrian Klaver adrian.kla...@aklaver.com

Re: "peer" authentication: cannot make "pg_ident.conf" work as I believe that the doc says that it should

2022-10-29 Thread Adrian Klaver
psql command line have "-U bob" It is not possible to make an alias mapping work without specifying "-U" on the psql command line.  Period.  The -U is precisely how you tell the server you are using an alias - without it the server expects that the o/s user is logging in using their own name as the requested login role.  In that case either a peer entry for the user exists - and thus authentication is successful - or it doesn't - and authentication will fail. +1 David J. -- Adrian Klaver adrian.kla...@aklaver.com

Re: "peer" authentication: cannot make "pg_ident.conf" work as I believe that the doc says that it should

2022-10-30 Thread Adrian Klaver
On 10/30/22 09:16, Karsten Hilbert wrote: Am Sat, Oct 29, 2022 at 09:15:08PM -0700 schrieb Adrian Klaver: *# MAPNAME    SYSTEM-USERNAME   PG-USERNAME* *# ---    ---   ---   bllewell   mary              mary * As has been said numerous times, it is

Re: CASE CLOSED... Re: "peer" authentication: cannot make "pg_ident.conf" work as I believe that the doc says that it should

2022-10-31 Thread Adrian Klaver
when I set a NOT NULL password for the role—and so it doesn't suit my purpose. This, on the other hand: psql -d postgres -U 'clstr$mgr' calls for "local", "peer" authentication as so it does NOT require a password. That would be enough for me. But, naturally, and now that it's working. I prefer the Peter-inspired bare "psql". Personally, I use longer forms like above as a form of explicit is better then implicit. There are no end of posts to this list where the issue was someone or something had changed a 'hidden' value in a env variable or conf file could not connect or connected to wrong cluster and/or database. -- Adrian Klaver adrian.kla...@aklaver.com

<    18   19   20   21   22   23   24   25   26   27   >