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
dance on how to resolve the issue.
Thank you so much. Anything would be helpful.
Thanks & Regards,
Gautham
--
Adrian Klaver
adrian.kla...@aklaver.com
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
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
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
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
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
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
= 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
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
what I did…
Thanks for his attention and collaboration!
>
--
Adrian Klaver
adrian.kla...@aklaver.com
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
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
otice that the order total doesn't include the new item until it hits
production.
--
Adrian Klaver
adrian.kla...@aklaver.com
on.
Thank you!
--
Adrian Klaver
adrian.kla...@aklaver.com
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
. looking forward to hearing from you.
Best Regards.
--
Adrian Klaver
adrian.kla...@aklaver.com
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
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
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,
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
I do to fix this once and for all???.
Thanks!
--
Adrian Klaver
adrian.kla...@aklaver.com
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
Karsten
--
GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B
--
Adrian Klaver
adrian.kla...@aklaver.com
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
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
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
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
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
ng a sequence.
bye,
//mirabilos
--
Adrian Klaver
adrian.kla...@aklaver.com
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
--
Adrian Klaver
adrian.kla...@aklaver.com
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
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
On 4/12/23 07:00, Mike Bayer wrote:
What is it you are trying to do?
--
Adrian Klaver
adrian.kla...@aklaver.com
)
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
') 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
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
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
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
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
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@
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
foo | t
Cheers,
Louis Tian
--
Adrian Klaver
adrian.kla...@aklaver.com
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
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
t; is correct in this case. It does not refer
to the number of returned values.
--
Erik
--
Adrian Klaver
adrian.kla...@aklaver.com
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
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
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
| 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
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&
.
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
.
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
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
the row.
...
Seb
--------
--
Adrian Klaver
adrian.kla...@aklaver.com
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
://www.prisma.io/
--
Adrian Klaver
adrian.kla...@aklaver.com
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
-------+-
(0 rows)
--
Adrian Klaver
adrian.kla...@aklaver.com
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...
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)
at OS command line run:
vacuumlo -V
--
Adrian Klaver
adrian.kla...@aklaver.com
array_agg
-
{category,line_id,category}
--
Adrian Klaver
adrian.kla...@aklaver.com
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
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
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
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
untu
12.14-1.pgdg18.04+1)
Please help me on this issue.
--
Shashidhar
--
Shashidhar
--
Adrian Klaver
adrian.kla...@aklaver.com
/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
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
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
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
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
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
at the PL/pgSQL refcursor is useful, at best, only in very
special use-cases?
--
Adrian Klaver
adrian.kla...@aklaver.com
://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
to supply when setting up pgAdmin4.
Have a good dayЗнімок екрана 2023-03-13 о 17.23.14.png
--
Adrian Klaver
adrian.kla...@aklaver.com
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
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
.
--
Adrian Klaver
adrian.kla...@aklaver.com
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
.
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
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
il.com
--
Adrian Klaver
adrian.kla...@aklaver.com
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
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
+
AS $function$ +
begin +
return bar * 1.0; +
end; +
$function$ +
(1 row)
--
Adrian Klaver
adrian.kla
+
AS $function$ +
begin +
return bar * 1.0; +
end; +
$function$ +
(1 row)
--
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
of that table.
--
Adrian Klaver
adrian.kla...@aklaver.com
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..
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
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
, 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
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>
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
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
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
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
701 - 800 of 4188 matches
Mail list logo