Re: PL/pgSQL doesn't support variables in queries?

2023-05-03 Thread Adrian Klaver
terminology, in pgsql? So is this possible? Many things are possible and they are covered in the documentation: https://www.postgresql.org/docs/current/plpgsql.html Read through that and you will find your questions answered. -JA- -- Adrian Klaver adrian.kla...@aklaver.com

Re: Multiple Postgrest Verisons how to set one version as default.

2023-04-29 Thread Adrian Klaver
dance on how to resolve the issue. Thank you so much. Anything would be helpful. Thanks & Regards, Gautham -- Adrian Klaver adrian.kla...@aklaver.com

Re: Postgres query doesn't accept double quote around schema name in query statement

2023-04-27 Thread Adrian Klaver
n, it is copied/pasted from OneNote which may have brought invalid quote, but the quotes used in pgadmin are correct. On Thu, Apr 27, 2023 at 12:46 PM Adrian Klaver mailto:adrian.kla...@aklaver.com>> wrote: On 4/27/23 12:40, Michael Xu wrote: > Hi, > > By default

Re: Postgres query doesn't accept double quote around schema name in query statement

2023-04-27 Thread Adrian Klaver
ux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-10), 64-bit Thanks! Michael -- Adrian Klaver adrian.kla...@aklaver.com

Re: FW: Error!

2023-04-25 Thread Adrian Klaver
n you would get this error: psql: error: connection to server at "::1", port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections? -- Adrian Klaver adrian.kla...@aklaver.com

Re: FW: Error!

2023-04-24 Thread Adrian Klaver
so screenshots have to be opened in another program. Also it is simple to get the text. In the terminal/console right click and click on Select All and then hit Enter to copy the content and then paste to your email. Thanks! Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for Wind

Re: FW: Error!

2023-04-24 Thread Adrian Klaver
the command used and the error message it will be difficult to point at a documented answer. Thanks so much for attention and collaboration! Best regards! -- Adrian Klaver adrian.kla...@aklaver.com

Re: what happens if a failed transaction is not rolled back?

2023-04-24 Thread Adrian Klaver
On 4/24/23 08:43, Adrian Klaver wrote: On 4/24/23 08:37, Siddharth Jain wrote: Hi All, i understand when writing application code, we should rollback a transaction that fails to commit. this is typically done in the catch block of a try-catch exception handler. but what if the developer does

Re: what happens if a failed transaction is not rolled back?

2023-04-24 Thread Adrian Klaver
= psycopg2.connect("dbname=test host=localhost user=postgres") cur = con.cursor() cur.execute("select 1/0") DivisionByZero: division by zero cur.execute("select 1") InFailedSqlTransaction: current transaction is aborted, commands ignored until end of transaction block

Re: [EXT] Re: SCROLLABLE/UPDATABLE cursor question

2023-04-24 Thread Adrian Klaver
med without updating catalog tables: Note that CREATE TABLE from a non-SDM client does not maintain LzRelational catalog tables seems to indicate you are using some sort of Postgres fork. Is that the case and if so what is the fork? -- Adrian Klaver adrian.kla...@aklaver.com

Re: FW: Error!

2023-04-22 Thread Adrian Klaver
what I did… Thanks for his attention and collaboration! > -- Adrian Klaver adrian.kla...@aklaver.com

Re: What happened to the tip "It is good practice to create a role that has the CREATEDB and CREATEROLE privileges..."

2023-04-19 Thread Adrian Klaver
r only documentation files doc/src/sgml/ref/alter_role.sgml doc/src/sgml/ref/create_role.sgml doc/src/sgml/ref/createuser.sgml doc/src/sgml/user-manag.sgml so I don't see how it can change behavior. -- Adrian Klaver adrian.kla...@aklaver.com

Re: psql:t_mstr.sql:994: ERROR: function to_char(numeric) does not exist

2023-04-19 Thread Adrian Klaver
to it. It will not change your situation, as others have pointed out that is a schema/search_path issue. You will still need to resolve that. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Joins of data-modifying CTE with the target table

2023-04-19 Thread Adrian Klaver
otice that the order total doesn't include the new item until it hits production. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Joins of data-modifying CTE with the target table

2023-04-19 Thread Adrian Klaver
on. Thank you! -- Adrian Klaver adrian.kla...@aklaver.com

Re: COPY RETURNING?

2023-04-19 Thread Adrian Klaver
rows, I guess, but I'm not sure the COPY protocol supports returning rows, nor what the syntax would be to have a COPY RETURNING form of COPY. Thanks for any insights. --DD -- Adrian Klaver adrian.kla...@aklaver.com

Re: Request for information about postgres version 15.2 stability

2023-04-18 Thread Adrian Klaver
. looking forward to hearing from you. Best Regards. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Call a Normal function inside a Trigger Function

2023-04-16 Thread Adrian Klaver
Any idea or link are welcome. Thanks in advance sure, there is not any limit. Regards Pavel Best Regards -- Jaurès FOUTE -- Adrian Klaver adrian.kla...@aklaver.com

Re: PL/pgSQL's "open cur for execute" provides workarouned... Re: cursors with prepared statements

2023-04-16 Thread Adrian Klaver
On 4/16/23 11:02, Bryn Llewellyn wrote:> statement fails but doing this using PL/pgSQL succeeds. What's going on under the covers? Pretty sure: https://www.postgresql.org/docs/current/spi.html -- Adrian Klaver adrian.kla...@aklaver.com

Re: FW: Error!

2023-04-15 Thread Adrian Klaver
working correctly, that's it. Five question: Just a Postgresql 15. Thanks! for your attention! and collaboration! Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for Windows *From: *Adrian Klaver <mailto:adrian.kla...@aklaver.com> *Sent: *Saturday, April 15,

Re: FW: Error!

2023-04-15 Thread Adrian Klaver
versions of postgresql that are in the link that you sent me.' Or did you just download for the fun of it and not actually install. How many versions of Postgres do you have installed now? Thanks! Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for Windows *From: *Adrian

Re: FW: Error!

2023-04-15 Thread Adrian Klaver
I do to fix this once and for all???. Thanks! -- Adrian Klaver adrian.kla...@aklaver.com

Re: JSON / ASP.NET AJAX Dates support in PostgreSQL

2023-04-15 Thread Adrian Klaver
On 4/15/23 03:46, Peter J. Holzer wrote: On 2023-04-14 10:44:08 -0700, Adrian Klaver wrote: On 4/14/23 9:31 AM, Peter J. Holzer wrote: On 2023-04-13 10:07:09 -0500, Ron wrote: On 4/13/23 09:44, Sebastien Flaesch wrote: Is there an easy way to convert JSON data containing ASP.NET AJAX

Re: Guidance on INSERT RETURNING order

2023-04-14 Thread Adrian Klaver
Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- Adrian Klaver adrian.kla...@aklaver.com

Re: JSON / ASP.NET AJAX Dates support in PostgreSQL

2023-04-14 Thread Adrian Klaver
tween the sender and the receiver. This looks like "milliseconds since the Unix epoch: $ date -d @1672692813.062 Mon 02 Jan 2023 02:53:33 PM CST Thus: select to_timestamp(cast(1672692813062 as bigint))::timestamp; ITYM: select to_timestamp(1672692813062/1000.0); hp -- Adrian Klaver adrian.kla...@aklaver.com

Re: cursor with hold must be save to disk?

2023-04-14 Thread Adrian Klaver
going to guess the cursor query is holding a large amount of data. To get a more specific answer you will need to provide: 1) Postgres version. 2) The complete DECLARE command being used. 3) An indication of the amount of data being retrieved. 4) The actual time for a 'long time'. -- Adrian

Re: Unexpected behavior when combining `generated always` columns and update rules

2023-04-13 Thread Adrian Klaver
the same thing. That your '...actually computed on insertion,...' meant not just for an INSERT but for any change in the data. In other words when the original query actually ran. Ciprian. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Unexpected behavior when combining `generated always` columns and update rules

2023-04-13 Thread Adrian Klaver
the rule action. So at the time of the rule action x.d is still 10. What this points out is that you will lead a simpler life if you use triggers instead of rules. Ciprian. -- Adrian Klaver adrian.kla...@aklaver.com

Re: JSON / ASP.NET AJAX Dates support in PostgreSQL

2023-04-13 Thread Adrian Klaver
o convert an AJAX Date from JSON or do I have to do this by hand? By hand as this is a MS/ASP thing: https://weblogs.asp.net/bleroy/dates-and-json not a JSON thing. Seb ---- -- Adrian Klaver adrian.kla...@aklaver.com

Re: Guidance on INSERT RETURNING order

2023-04-12 Thread Adrian Klaver
ng a sequence. bye, //mirabilos -- Adrian Klaver adrian.kla...@aklaver.com

Re: FW: Error!

2023-04-12 Thread Adrian Klaver
solve this error that does not allow me to move forward, sorry for the inconveniences. Thanks again, best regards! Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for Windows *From: *Adrian Klaver <mailto:adrian.kla...@aklaver.com> *Sent: *Wednesday, April 12, 2

Re: Guidance on INSERT RETURNING order

2023-04-12 Thread Adrian Klaver
-- Adrian Klaver adrian.kla...@aklaver.com

Re: FW: Error!

2023-04-12 Thread Adrian Klaver
I want to develop for my project. I hope you can find the person responsible for these abnormalities. Thanks! Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for Windows -- Adrian Klaver adrian.kla...@aklaver.com

Re: Performance issue after migration from 9.4 to 15

2023-04-12 Thread Adrian Klaver
l.org/docs/current/pgupgrade.html Statistics Because optimizer statistics are not transferred by pg_upgrade, you will be instructed to run a command to regenerate that information at the end of the upgrade. You might need to set connection parameters to match your new cluster. -- Adr

Re: subscribe

2023-04-12 Thread Adrian Klaver
On 4/12/23 07:00, Mike Bayer wrote: What is it you are trying to do? -- Adrian Klaver adrian.kla...@aklaver.com

Re: Guidance on INSERT RETURNING order

2023-04-11 Thread Adrian Klaver
) SELECT data FROM (VALUES ('a', 1), ('b', 2), ('c', 3)) as vv(data, num) ORDER BY num RETURNING id Or with i as (INSERT INTO t(data) VALUES ('a', 1), ('b', 2), ('c', 3) returning id) select i.id from i order by id; Sorry for the long email, Thanks Federico -- Adrian Klaver

Re: Guidance on INSERT RETURNING order

2023-04-11 Thread Adrian Klaver
') RETURNING id but we were recently made aware that there is no guarantee on the order of the returned columns. 1) Because returned data in SQL is inherently unordered. 2) What would you order by, id or data or both? Sorry for the long email, Thanks Federico -- Adrian Klaver adrian.kla

Re: [EXTERNAL]: Re: [EXTERNAL]: Re: UPSERT in Postgres

2023-04-09 Thread Adrian Klaver
ion with the inserted data. It's a quick and dirty way to avoid queries that look for potential violations ahead of time, basically 'Ask forgiveness' vs 'Get permission'. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Postgresql Upgrade from 10 to 14

2023-04-09 Thread Adrian Klaver
or a service? 3) The hardware specifications for the machine? 4) How was the upgrade done? 5) An example of a slow query with the output of EXPLAIN 6) What version of the JDBC driver? -- Adrian Klaver adrian.kla...@aklaver.com

Re: [EXTERNAL]: Re: UPSERT in Postgres

2023-04-08 Thread Adrian Klaver
TO ... While I am expecting the insert is never executed in the first place when that row already exist (as identified by it primary key). So the update execute without error. I hope the pesudo code above is enough to clarify the difference? Cheers, Louis Tian -- Adrian Klaver adrian.kla...@aklaver.com

Re: doc sql-grant.html Synopsis error?

2023-04-08 Thread Adrian Klaver
fy the function name as IN SCHEMA is not available in that form of the command. -- Achilleas Mantzios IT DEV - HEAD IT DEPT Dynacom Tankers Mgmt -- Adrian Klaver adrian.kla...@aklaver.com

Re: pg_ctlcluster is not stopping cluster

2023-04-07 Thread Adrian Klaver
u postgres /usr/bin/pg_ctlcluster 13 main stop -- -m fast depending on which cluster you want to shut down. /usr/lib/postgresql/15/bin/postgres "-D" "/var/lib/postgresql/13/main" "-c" "config_file=/etc/postgresql/15/main/postgresql.conf" root@

Re: pg_ctlcluster is not stopping cluster

2023-04-07 Thread Adrian Klaver
ermine what is actually running. Then do sudo -u postgres /usr/bin/pg_ctlcluster main stop -- -m fast -D /var/lib/postgresql/13/main stop -m fast for whatever version is running. -- Adrian Klaver adrian.kla...@aklaver.com

Re: [EXTERNAL]: Re: UPSERT in Postgres

2023-04-07 Thread Adrian Klaver
foo | t Cheers, Louis Tian -- Adrian Klaver adrian.kla...@aklaver.com

Re: [EXTERNAL]: Re: UPSERT in Postgres

2023-04-07 Thread Adrian Klaver
nto person (id, name, is_active) values(0, , true) I'm would not like the server making those guesses on my behalf. , Cheers, Louis Tian -------- -- Adrian Klaver adrian.kla...@aklaver.com

Re: UPSERT in Postgres

2023-04-06 Thread Adrian Klaver
t proper prior to PG15? *Feature Request* Given that UPSERT is an *idempotent* operator it is extremely useful. Would love to see an UPSERT command in PostgreSQL so one can 'upsert' properly and easily. Regards, Louis Tian -- Adrian Klaver adrian.kla...@aklaver.com

Re: ​jsonb @@ jsonpath operator doc: ​Only the first item of the result is taken into account

2023-04-04 Thread Adrian Klaver
t; is correct in this case. It does not refer to the number of returned values. -- Erik -- Adrian Klaver adrian.kla...@aklaver.com

Re: ​jsonb @@ jsonpath operator doc: ​Only the first item of the result is taken into account

2023-04-03 Thread Adrian Klaver
On 4/3/23 12:00, Erik Wienhold wrote: On 03/04/2023 18:37 CEST Adrian Klaver wrote: On 4/3/23 09:21, Erik Wienhold wrote: On 03/04/2023 17:36 CEST Adrian Klaver wrote: On 4/3/23 08:11, Erik Wienhold wrote: On 02/04/2023 17:40 CEST Adrian Klaver wrote: That is a long way from: jsonb

Re: ​jsonb @@ jsonpath operator doc: ​Only the first item of the result is taken into account

2023-04-03 Thread Adrian Klaver
On 4/3/23 09:21, Erik Wienhold wrote: On 03/04/2023 17:36 CEST Adrian Klaver wrote: On 4/3/23 08:11, Erik Wienhold wrote: On 02/04/2023 17:40 CEST Adrian Klaver wrote: That is a long way from: jsonb @@ jsonpath → boolean Returns the result of a JSON path predicate check for the specified

Re: ​jsonb @@ jsonpath operator doc: ​Only the first item of the result is taken into account

2023-04-03 Thread Adrian Klaver
On 4/3/23 08:11, Erik Wienhold wrote: On 02/04/2023 17:40 CEST Adrian Klaver wrote: That is a long way from: jsonb @@ jsonpath → boolean Returns the result of a JSON path predicate check for the specified JSON value. Only the first item of the result is taken into account. If the result

Re: ​jsonb @@ jsonpath operator doc: ​Only the first item of the result is taken into account

2023-04-02 Thread Adrian Klaver
| t (5 rows) That is a long way from: jsonb @@ jsonpath → boolean Returns the result of a JSON path predicate check for the specified JSON value. Only the first item of the result is taken into account. If the result is not Boolean, then NULL is returned. -- Erik -- Adrian Klaver adrian.kla...@aklaver.com

Re: COPY and custom datestyles. Or some other technique?

2023-03-29 Thread Adrian Klaver
On 3/29/23 16:31, Adrian Klaver wrote: On 3/29/23 16:24, Ron wrote: Postgresql 13.10 $ psql -h myhost.example.com -X dba \ -c "\copy ${tbl} from '/var/lib/pgsql/Rdb/${tbl}.csv' WITH DELIMITER '|';" ERROR:  date/time field value out of range: "2013061914122501&

Re: COPY and custom datestyles. Or some other technique?

2023-03-29 Thread Adrian Klaver
. There are 550+ tables, so something that I can do once on this end would make my life a lot easier. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Using CTID system column as a "temporary" primary key

2023-03-29 Thread Adrian Klaver
. 2) 0 can be a valid sequence value: test(5432)=# create sequence zero_test start 0 minvalue 0; CREATE SEQUENCE test(5432)=# select * from zero_test ; last_value | log_cnt | is_called +-+--- 0 | 0 | f Then what do you do? -- Adrian Klaver adrian.kla

Re: Using CTID system column as a "temporary" primary key

2023-03-29 Thread Adrian Klaver
On 3/29/23 09:43, Peter J. Holzer wrote: On 2023-03-29 07:59:54 -0700, Adrian Klaver wrote: On 3/29/23 07:19, Sebastien Flaesch wrote: INSERT statements must not use the serial column, so you have to list all columns of the table and provide only the values of the non-serial columns

Re: Using CTID system column as a "temporary" primary key

2023-03-29 Thread Adrian Klaver
the row. ... Seb -------- -- Adrian Klaver adrian.kla...@aklaver.com

Re: How are the SELECT queries reconstructed in pg_views

2023-03-28 Thread Adrian Klaver
On 3/28/23 13:23, Adrian Klaver wrote: On 3/28/23 06:43, Julius de Bruijn wrote: Hi, I haven't been able to find exactly what changes PostgreSQL does when reconstructing the query, but I've successfully been able to create views where the resulting query differs from what I wrote

Re: How are the SELECT queries reconstructed in pg_views

2023-03-28 Thread Adrian Klaver
://www.prisma.io/ -- Adrian Klaver adrian.kla...@aklaver.com

Re: Cluster table based on grand parent?

2023-03-28 Thread Adrian Klaver
ndchild (id int generated always as identity primary key, parent int not null references child(id) on delete cascade, name text not null, unique(parent, name)); CREATE TABLE ``` -- Adrian Klaver adrian.kla...@aklaver.com

Re: Plans for ON DELETE CASCADE? Which index is used, if at all?

2023-03-28 Thread Adrian Klaver
-------+- (0 rows) -- Adrian Klaver adrian.kla...@aklaver.com

Re: Convert pg_constraint.conkey array to same-order array of column names

2023-03-24 Thread Adrian Klaver
On 3/24/23 9:44 AM, Dominique Devienne wrote: On Fri, Mar 24, 2023 at 5:40 PM Adrian Klaver <mailto:adrian.kla...@aklaver.com>> wrote: On 3/24/23 03:28, Dominique Devienne wrote: > On Thu, Mar 23, 2023 at 4:20 PM Adrian Klaver mailto:adrian.kla...

Re: Convert pg_constraint.conkey array to same-order array of column names

2023-03-24 Thread Adrian Klaver
On 3/24/23 03:28, Dominique Devienne wrote: On Thu, Mar 23, 2023 at 4:20 PM Adrian Klaver <mailto:adrian.kla...@aklaver.com>> wrote: On 3/23/23 04:12, Dominique Devienne wrote: > CROSS JOIN LATERAL UNNEST(cnstr.conkey) WITH ORDINALITY AS cols(value, rank)

Re: How to install vacuumlo on a client?

2023-03-23 Thread Adrian Klaver
at OS command line run: vacuumlo -V -- Adrian Klaver adrian.kla...@aklaver.com

Re: Convert pg_constraint.conkey array to same-order array of column names

2023-03-23 Thread Adrian Klaver
array_agg - {category,line_id,category} -- Adrian Klaver adrian.kla...@aklaver.com

Re: Is the PL/pgSQL refcursor useful in a modern three-tier app?

2023-03-22 Thread Adrian Klaver
set without knowing how many there are. Maybe that fact is there internally—but with no explicit SQL or PL/pgSQL exposure of the value. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Getting error while upgrading postgres from version 12 to 13

2023-03-21 Thread Adrian Klaver
o indicate which directory path has which PG_VERSION value. While you are at it do: /usr/lib/postgresql/13/bin/pg_upgrade -V and post the version returned. On Tue, 21 Mar, 2023, 8:09 pm Adrian Klaver, <mailto:adrian.kla...@aklaver.com>> wrote: On 3/21/23 03:29, sha

Re: Getting error while upgrading postgres from version 12 to 13

2023-03-21 Thread Adrian Klaver
running.  Showing that psql itself works on both running clusters would be a good start.  Show inputs, not just outputs those inputs creates. David J. -- Shashidhar -- Adrian Klaver adrian.kla...@aklaver.com

Re: Is the PL/pgSQL refcursor useful in a modern three-tier app?

2023-03-20 Thread Adrian Klaver
ntions, including those involving DECLARE and OPEN statements." https://www.postgresql.org/docs/current/plpgsql-cursors.html "Rather than executing a whole query at once, it is possible to set up a cursor that encapsulates the query, and then read the query result a few rows at a time. One reason for doing this is to avoid memory overrun when the result contains a large number of rows. (However, PL/pgSQL users do not normally need to worry about that, since FOR loops automatically use a cursor internally to avoid memory problems.) A more interesting usage is to return a reference to a cursor that a function has created, allowing the caller to read the rows. This provides an efficient way to return large row sets from functions." As to portal, entering it in the documentation search leads to a first result of: https://www.postgresql.org/docs/current/protocol-flow.html Do a page search for portal. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Getting error while upgrading postgres from version 12 to 13

2023-03-18 Thread Adrian Klaver
untu 12.14-1.pgdg18.04+1) Please help me on this issue. -- Shashidhar -- Shashidhar -- Adrian Klaver adrian.kla...@aklaver.com

Re: Can't connect to server

2023-03-18 Thread Adrian Klaver
/Her/Hers *Full-Time MBA Candidate 2023* *Graduate Assistant - Admission Team * Broad College of Business Michigan State University *C*: (517) 329 - 5793 *E*: wuchi...@msu.edu *WHO WILL MAKE BUSINESS HAPPEN?* *SPARTANS WILL.* -- Adrian Klaver adrian.kla...@aklaver.com

Re: Is the PL/pgSQL refcursor useful in a modern three-tier app?

2023-03-16 Thread Adrian Klaver
thout anything like Oracle PL/SQL's packages, you have no mechanism to hold the opened cursor variable between successive server calls.) Is it fair to say that the PL/pgSQL refcursor is useful, at best, only in very special use-cases?" evolves into deep dive into all thing cursors. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Is the PL/pgSQL refcursor useful in a modern three-tier app?

2023-03-15 Thread Adrian Klaver
r a convincing example. Huh? You provided your own example earlier: "Of course, it all falls into place now. I can see how I could write a client app in, say, Python to write a humongous report to a file by fetching manageably-sized chunks, time and again until done with a function like my "g()" here, from a cursor that I'd opened using a function like my "f()"." -- Adrian Klaver adrian.kla...@aklaver.com

Re: How to behive if I remove password from postgres role

2023-03-15 Thread Adrian Klaver
ot a password. Once you are in you can alter the postgres user to have a proper password. Regards, Raivo -- Adrian Klaver adrian.kla...@aklaver.com

Re: Table scan on 15.2

2023-03-15 Thread Adrian Klaver
count (1000 total values). 1 1 1 1 1 1 1 2 2 2 3 4 6 7 7 10 10 11 12 14 14 22 22 23 23 25 29 29 34 39 50 56 67 75 137 258 -- Adrian Klaver adrian.kla...@aklaver.com

Re: Is the PL/pgSQL refcursor useful in a modern three-tier app?

2023-03-14 Thread Adrian Klaver
subprogram can invoke other subprograms and so on ad infinitum. But eventually the whole stack empties and control passes back to the client. But all that falls away now with the exampe I showed in place. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Is the PL/pgSQL refcursor useful in a modern three-tier app?

2023-03-14 Thread Adrian Klaver
at the PL/pgSQL refcursor is useful, at best, only in very special use-cases? -- Adrian Klaver adrian.kla...@aklaver.com

Re: Issues Scaling Postgres Concurrency

2023-03-14 Thread Adrian Klaver
://wiki.postgresql.org/wiki/Slow_Counting 2) Are you using connection pooling? I would appreciate any insights or advice on how to optimize Postgres for high concurrency scenarios. Thank you in advance for your help! -- Adrian Klaver adrian.kla...@aklaver.com

Re: Problems connecting to the server

2023-03-14 Thread Adrian Klaver
to supply when setting up pgAdmin4. Have a good dayЗнімок екрана 2023-03-13 о 17.23.14.png -- Adrian Klaver adrian.kla...@aklaver.com

Re: Properly handle OOM death?

2023-03-13 Thread Adrian Klaver
ka Volcano Observatory Geophysical Institute - UAF 2156 Koyukuk Drive Fairbanks AK 99775-7320 Work: 907-474-5172 cell:  907-328-9145 -- Adrian Klaver adrian.kla...@aklaver.com

Re: Help? Unexpected PostgreSQL compilation failure using generic compile script

2023-03-12 Thread Adrian Klaver
help - even if it's to tell me I'm an idiot for missing one or more incredibly basic things somehow - I would be very grateful. Many thanks. Regards, M. -- Adrian Klaver adrian.kla...@aklaver.com

Re: garbage data back

2023-03-06 Thread Adrian Klaver
. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Fwd: garbage data back

2023-03-06 Thread Adrian Klaver
quot;FileKey"\ Because "Orders"."ID" is different then "Order Items"."ID"? Wait, then why are the Item IDs different? -- Adrian Klaver adrian.kla...@aklaver.com

Re: garbage data back

2023-03-06 Thread Adrian Klaver
. select "FileKey", "OrderItemID" from "vw_rptInvc_Permits" where "FileKey" LIKE '%1317' image.png I'm stumped. Any guesses? What is the view definition? Is there a table named vw_rptInvc_Permits? -- Adrian Klaver adrian.kla...@aklaver.com

Re: what's hsitoric MVCC Snapshot?

2023-03-05 Thread Adrian Klaver
On 3/5/23 07:58, Adrian Klaver wrote: On 3/5/23 06:49, jack...@gmail.com wrote: Here are the comments in src/include/utils/snapshot.h. /* * For normal MVCC snapshot this contains the all xact IDs that are in * progress, unless the snapshot was taken during recovery in which case * it's empty

Re: what's hsitoric MVCC Snapshot?

2023-03-05 Thread Adrian Klaver
il.com -- Adrian Klaver adrian.kla...@aklaver.com

Re: Tempory table is not getting created inside Function in postgres.

2023-02-27 Thread Adrian Klaver
me, you are embedding a DO inside the function. 1) Pretty sure that is not going to work. Especially as you are changing languages. 2) Why are you doing that? 3) Either incorporate everything into one function or create separate stand alone function for the DO portion and use that in the post_p

Re: Tempory table is not getting created inside Function in postgres.

2023-02-27 Thread Adrian Klaver
any one help me why in the function i am not able to create the temp table. what is alternative You are running this in pgAdmin4 Query Tool, correct? Is Autocommit set? Have you tried this in psql? -- Adrian Klaver adrian.kla...@aklaver.com

Re: pg_get_functiondef(), trailing spaces and + sign

2023-02-27 Thread Adrian Klaver
+  AS $function$ +  begin + return bar * 1.0; +  end;  +  $function$    + (1 row) -- Adrian Klaver adrian.kla

Re: pg_get_functiondef(), trailing spaces and + sign

2023-02-27 Thread Adrian Klaver
+  AS $function$ +  begin + return bar * 1.0; +  end;  +  $function$    + (1 row) -- Adrian Klaver

Re: pg_upgradecluster transfering only a portion of the data

2023-02-27 Thread Adrian Klaver
On 2/27/23 09:10, Adrian Klaver wrote: On 2/27/23 09:05, Dávid Suchan wrote: Please use Reply All Ccing list My bad, \l+ lists databases and their respective sizes- I used that and also pg_size_pretty(), the result size was the same - before it was 20gb for the biggest db, after

Re: pg_upgradecluster transfering only a portion of the data

2023-02-27 Thread Adrian Klaver
of that table. -- Adrian Klaver adrian.kla...@aklaver.com

Re: pg_upgradecluster transfering only a portion of the data

2023-02-27 Thread Adrian Klaver
was "success" 4) I did not, I presume it is there, the question is why only 700 mb was transferred If you have not connected how could you do the \l and row count? 5) would it be inside main pg log? Or some special one? Dňa po 27. 2. 2023, 17:14 Adrian Klaver <mailto:adrian.kla..

Re: pg_upgradecluster transfering only a portion of the data

2023-02-27 Thread Adrian Klaver
On 2/27/23 08:48, Tom Lane wrote: Adrian Klaver writes: On 2/27/23 08:36, Tom Lane wrote: If it was based on something like "du", perhaps the measurement was fooled by the fact that most of the data files will be hard-linked between the old and new clusters. Does that happ

Re: pg_upgradecluster transfering only a portion of the data

2023-02-27 Thread Adrian Klaver
On 2/27/23 08:36, Tom Lane wrote: Adrian Klaver writes: On 2/27/23 07:44, Dávid Suchan wrote: After a successful prompt finished, I checked the database and the size went from originally 20gb (in 9.6) to 700~ mb (in 14) while the disk space available shrank by about 2gb meaning

Re: pg_upgradecluster transfering only a portion of the data

2023-02-27 Thread Adrian Klaver
, what would be the best practice when upgrading pg version with huge amounts of data(could be a terabyte)? -- Adrian Klaver adrian.kla...@aklaver.com

Re: Debugging postgres on Windows - could not open directory "/lib"

2023-02-24 Thread Adrian Klaver
On 2/23/23 17:16, Cathy Xie wrote: On Thu, Feb 23, 2023 at 1:21 AM Adrian Klaver <mailto:adrian.kla...@aklaver.com>> wrote: On 2/21/23 17:18, Cathy Xie wrote: > > > On Wed, Feb 22, 2023 at 6:54 AM Adrian Klaver mailto:adrian.kla...@aklaver.com>

Re: Debugging postgres on Windows - could not open directory "/lib"

2023-02-22 Thread Adrian Klaver
On 2/21/23 17:18, Cathy Xie wrote: On Wed, Feb 22, 2023 at 6:54 AM Adrian Klaver Hi Adrian, Thanks for your email! 1) How did you build it? I installed ActivateState Perl, Bison, and Flex. Then I ran the command ```build Debug``` under directory postgres/src/tools/msvc 2

Re: Debugging postgres on Windows - could not open directory "/lib"

2023-02-21 Thread Adrian Klaver
1) How did you build it? 2) Open pgsql.sln in a text editor and report the results here. Best regards, Cathy -- Adrian Klaver adrian.kla...@aklaver.com

Re: pg_dump'ed file contains "DROP DATABASE"

2023-02-20 Thread Adrian Klaver
On 2/20/23 19:22, p...@pfortin.com wrote: On Mon, 20 Feb 2023 15:24:23 -0800 Adrian Klaver wrote: It just dawned on me you might be doing all of this through the pgAdmin4 GUI. Sorry for any confusion... I get it now... A team member uses pgAdmin4 to load separate table(s) into his DB

Re: pg_dump'ed file contains "DROP DATABASE"

2023-02-20 Thread Adrian Klaver
On 2/20/23 11:36, p...@pfortin.com wrote: On Mon, 20 Feb 2023 11:06:34 -0800 Adrian Klaver wrote: On 2/20/23 10:27, p...@pfortin.com wrote: [Still a newbie; but learning fast...] Hi, Notwithstanding the man page, my take is that the DROP DATABASE statement needs to be eliminated

<    3   4   5   6   7   8   9   10   11   12   >