Re: Coalesce 2 Arrays

2019-06-24 Thread David G. Johnston
], array[null,4]); > tt > --- > {3,4} > (1 row) > Plain SQL variant: SELECT array_agg(COALESCE(a, b)) FROM ( SELECT unnest(ARRAY[null, 2]::int[]), unnest(ARRAY[1,null]::int[]) ) vals (a, b); Even if they aren't the same length the above should work, I think, as extra rows for the shorter array will contribute padded nulls. David J.

Re: Function Volatility Stable vs Immutable

2019-06-24 Thread David G. Johnston
; and therefore can be only marked as Stable and not Immutable? > Yes Forever means beyond the lifetime of a single transaction and thus it is possible for the changing of the table contents to impact the return value of the function. David J.

Re: Need a referential constraint to a non-unique record

2019-06-25 Thread David G. Johnston
On Tue, Jun 25, 2019 at 2:58 PM David Gauthier wrote: > I need to create a constraint on a column of a table such that it's value > is found in another table but may not be unique in that other table. > Example... > This requires a trigger > > Let's say the DB is a

Re: Why does jsonb_set() remove non-mentioned keys?

2019-07-04 Thread David G. Johnston
ined as being STRICT (null on null input). You need to COALSESCE SQL NULL to JSON 'null' to obtain the result you desire. This is a general truth when dealing with the JSON type in PostgreSQL. select jsonb_set('{"foo": 1}'::jsonb, '{bar}', coalesce(to_jsonb(null::int), 'null'), true) David J.

Re: Why does jsonb_set() remove non-mentioned keys?

2019-07-04 Thread David G. Johnston
> > Sql null poisons the function call which immediately returns sql null > > select to_jsonb('null'::text); > ┌──┐ > │ to_jsonb │ > ├──┤ > │ "null" │ > └──┘ > > Json null > I'm sharing Thomas's confusion… > > Sql null and json null are represented differently; strict functions with sql null inputs yield sql null output without even executing the function David J.

Re: Why does jsonb_set() remove non-mentioned keys?

2019-07-04 Thread David G. Johnston
On Thu, Jul 4, 2019 at 2:09 PM David G. Johnston wrote: > On Thursday, July 4, 2019, Gianni Ceccarelli > wrote: > >> >> > select to_jsonb('null'::text); >> ┌──┐ >> │ to_jsonb │ >> ├──┤ >> │ "null" │ >&g

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

2023-04-24 Thread David G. Johnston
back from > the database. > > There isn't anything special about a failed transaction compared to any other transaction that you leave open. Might help to describe what the application does with the connection subsequent to the point of attempted commit. David J.

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

2023-04-24 Thread David G. Johnston
On Mon, Apr 24, 2023 at 12:56 PM David Wheeler wrote: > > > On 25 Apr 2023, at 1:47 am, David G. Johnston > wrote: > > > There isn't anything special about a failed transaction compared to any > other transaction that you leave open. > > > Now I’m cu

Re: libpq and multi-threading

2023-05-02 Thread David G. Johnston
#x27;t, that is a server-side configuration. "Specifies the dynamic shared memory implementation that the server should use." https://www.postgresql.org/docs/current/runtime-config-resource.html#RUNTIME-CONFIG-RESOURCE-MEMORY David J.

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

2023-05-03 Thread David G. Johnston
So is this possible? > The output of a set-returning function (srf) is a single tabular result. If you want to produce multiple tabular results you would need to either serialize them (say into jsonb) or assign a cursor name to each and then reference them by name. David J.

Re: Trigger questions

2023-05-04 Thread David G. Johnston
On Thu, May 4, 2023 at 7:04 AM Justin wrote: > > > On Thu, May 4, 2023 at 9:49 AM DAVID ROTH wrote: > >> 1) Can I create a trigger on a view? >> 2) Do triggers cascade? >> >> Say I have an insert trigger on a table. >> And, I have an insert trigger on

Re: What type of Compiler to SQL? Memory-Image (Load-and-Go) Format?

2023-05-04 Thread David G. Johnston
age (Load-and-Go) Format > > > IIUC (I haven't formally studied compilers), none of the above, or, rather, not applicable. I can conjure up an analogy that says the assembly language artifact has a similar relationship to the operating system kernel as the compiled plan has to the database executor. David J.

Re: sorting problem with distinct on()

2023-05-05 Thread David G. Johnston
; 9 | SgrA* > > Notice that 12 is missing in the list. > Even with x as (select distinct on(symb) * from stars) select * from x > where nb = 12 order by nb; > nb = 12 is a duplicate with np = 34 Since your DISTINCT ON *subquery* doesn't specify an ordering which of those two are chosen as the representative record for M31 is non-determinstic. If you want to ensure the lowest valued nb is chosen you need to sort the *subquery*. The first record the DISTINCT encounters is the one selected to represent. Sorting in the outer/main query happens after the DISTINCT and so the record is already gone. David J.

Re: Adding SHOW CREATE TABLE

2023-05-12 Thread David G. Johnston
tly installed version of what, the server or the client? > It's an SQL Command, no specific client can/should be presumed. David J. >

Re: Records, Types, and Arrays

2023-05-18 Thread David G. Johnston
mposite_type.column1 I don't know why I'd want to give up the expressiveness of writing the column name. David J.

Re: Records, Types, and Arrays

2023-05-18 Thread David G. Johnston
ape their query level, and if you then try to cast the concrete record to some other concrete type a cast needs to exist. David J.

Re: Records, Types, and Arrays

2023-05-19 Thread David G. Johnston
ility to change row > structure on the fly making the cast possible? In what way would the query > calling get_row() be critical? > Row() is pure syntax. It distinguishes (col) vs. row(col) where the first is just a column in parentheses and the second is a composite with one column member. David J.

Re: explicit-locking.html "key values" reference

2023-05-26 Thread David G. Johnston
re that this row/relationship continues to exist, you may change other attributes". David J.

Re: A question about generate_series

2023-05-28 Thread David G. Johnston
6 > 7 > 8 > 9 > 10 > 11 > 12 > 13 > 14 > 15 > 16 > 17 > 18 > 19 > 20 > 21 > Time: 0.518 ms > > My question is, why postgres didn't print the 22 to 25? > Can someone give some advice? > Thanks in advance! > Some kind of visual interaction between psql, the pager, and your terminal? David J.

Re: syntax pb

2023-05-30 Thread David G. Johnston
gt; > Can someone give a short SQL syntax hint ? > https://www.postgresql.org/docs/current/sql-expressions.html#SQL-SYNTAX-TYPE-CASTS David J.

Re: syntax pb

2023-05-30 Thread David G. Johnston
these things you may have larger model design and query writing concerns to deal with in addition to being able to identify the problems specific error messages are pointing out and trying to fix them. David J.

Re: What is gcda file?

2023-06-10 Thread David G. Johnston
https://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Gcov-Data-Files.html Seems like a reasonable answer to "what it is". David J.

Re: Reproducing incorrect order with order by in a subquery

2023-06-13 Thread David G. Johnston
t guaranteed ordered output you must place the order by in the outermost query level (i.e., before your limit 50). Trying to do that for dynamic SQL where you don't actually know what query you are working with is going to be a challenge - maybe force the user to have the order by column first in their query then just say "ORDER BY 1" in the wrapper query you are adding? Basically have them write "row_number() over (order by)" for their query and you then order by row number. David J.

Re: date format

2023-06-14 Thread David G. Johnston
when using copy. Either the cast for a given single setting produces the correct result or it doesn't. If you need a custom cast like this you have to get away from COPY first. Usually that is best done after importing data to a temporary table as text. David J.

Re: foreign keys on multiple parent table

2023-06-20 Thread David G. Johnston
tom triggers if you need something other than this. David J.

Re: libpq: What can and cannot be bound? How to know?

2023-06-21 Thread David G. Johnston
tify function that can be parameterized and handles the SQL-injection stuff for you. David J.

Re: regex failing

2023-06-27 Thread David G. Johnston
“1234:567”. This > seems to match positive and then fails due to not being an actual number in > the subsequent cast. > > > Works (returns false) here: select '1234:567' ~ '^([0-9]+[.]?[0-9]*)$'; https://mail.google.com/mail/u/0/?tab=mm&zx=y3hfqt48pyg7#all/FMfcgzGsnLNNXcRVCVNpjQhGknMSVLKn David J.

Re: psql and pgpass.conf on Windows

2023-06-29 Thread David G. Johnston
On Thu, Jun 29, 2023 at 7:42 PM wrote: > Trying to write a script that will run on Linux, Windows, and Mac. > This seems impossible on its face unless you use WSL within the Windows environment. And if you are doing that, then the pathing would be WSL pathing, not native Windows. David J.

Re: [bug]? insert returning composite type fails

2023-07-06 Thread David G. Johnston
On Thursday, July 6, 2023, Lorusso Domenico wrote: > > returning bt_info into _bt_info; > > I think it’s “returning (bt_info).* into _bt_info;” David J.

Re: INSERT UNIQUE row?

2023-07-09 Thread David G. Johnston
malformed data situations while preventing something that is basically impossible to encounter in real life. Especially if you also have separate individual indexes to make searching for specific subset of the database faster (i.e., everything in a state). David J.

Re: search_path for replica-mode

2023-07-10 Thread David G. Johnston
ica-mode? > > Relying on external search_path for system executed objects is problematic. Don’t do it. Either attach a SET to the function or schema-qualify references. David J.

Re: what causes new temp schemas to be created

2023-07-10 Thread David G. Johnston
ession they are created in. Hence, you get multiple temporary schemas if you have concurrent sessions using temporary objects. David J.

Re: what causes new temp schemas to be created

2023-07-10 Thread David G. Johnston
. > > The first time a session needs a temporary schema it is assigned one which is then immediately cleared out. David J.

Re: Problematic enforcement of "ERROR: functions in index predicate must be marked IMMUTABLE"

2023-07-10 Thread David G. Johnston
"changing the volatility marker" to be prohibited just like we prohibit changing the return type. David J.

Re: How to add function schema in search_path in option definitio

2023-07-11 Thread David G. Johnston
arch_path even exists. Unless you are writing custom operators, and even then, consider search_path to be evil. David J.

Re: psql -af > out, is possible to also have raise notice, raise info part.

2023-07-11 Thread David G. Johnston
le # 1 - implied), the "raise" stuff goes to stderr (file # 2) IIRC you can do: psql -af test.sql > test.out 2>&1 (order matters, left-to-right) But you can search online for "output redirection in Linux" or some such if you want to learn the Linux command line better. David J.

Re: Reset Postgresql users password

2023-07-12 Thread David G. Johnston
ng the format function: ... for rec in select format('alter user %I with password %L', usename, 'newpassword') from pg_user loop ... David J.

Re: Rocky Linux 9 and postgres10

2023-07-15 Thread David G. Johnston
other matter. David J.

Re: error in the example given for numeric data types

2023-07-15 Thread David G. Johnston
hat was previously undefined is now defined. It is not a bug to choose to not implement something. David J.

Re: How to grant read only functions execute permission to read only user

2023-07-17 Thread David G. Johnston
t the privileges of the user that executes them by > default. So if the user is read-only (i.e. has just SELECT privilege), > then the function can't do any writes either. > > > By definition any function marked stable or immutable is read-only though the system doesn't enforce that user-specified label. David J.

Re: TSQL To Postgres - Unpivot/Union All

2023-07-20 Thread David G. Johnston
se assist? > You need to provide more info - specifically the input data mentioned above. Try making a reproducer on this fiddle site. https://dbfiddle.uk/btGcOH30 David J.

Re: invalid value for parameter "default_text_search_config": "public.pg"

2023-07-20 Thread David G. Johnston
On Thursday, July 20, 2023, Les wrote: > I try to execute this on a very simple table, in a production database: > Please provide version information and any extensions you may have installed. David J.

Re: Grant all privileges to user on a database

2023-07-24 Thread David G. Johnston
e permission to do so is granted to the role on the schema, not the database. David J.

Re: [Beginner Question]Is there way to test the postgres's kernel function?

2023-07-24 Thread David G. Johnston
y don't know how to do it, wrtite a extension? > > Can someone give me some advice? > > A formal extension seems like overkill. PostgreSQL provides an ability to write customer user-space functions in C. You ought to be able to leverage that for this specific task. https://www.postg

Re: Grant all privileges to user on a database

2023-07-24 Thread David G. Johnston
bdevdb TO > cbdevdbadmin;". > > I'm quite happy that such a command doesn't go ahead and grant read, write, and execute privileges on every table, function, and view in the database. The thing that does what you describe is called SUPERUSER. David J.

Re: Create DB privilege is not inherited

2023-07-27 Thread David G. Johnston
SET ROLE before creating a database." David J.

Re: PostgreSQL - How to login with my Linux user account

2023-07-27 Thread David G. Johnston
ld be "postgres". David J.

Re: How to build a new grammer for pg?

2023-08-01 Thread David G. Johnston
On Tue, Aug 1, 2023 at 2:27 AM jacktby wrote: > Hi, I’m trying to develop a new grammar for pg, can you give me a code > example to reference? > Use git blame or a repo history viewer. David J.

Re: Sample pg_hba.conf allows local users to access all databases

2023-08-01 Thread David G. Johnston
system. https://www.postgresql.org/docs/current/ddl-priv.html And yes, this is a usability vs secure-by-default that hasn't seen enough complaint to take on changing the default. David J.

Re: question on auto_explain

2023-08-03 Thread David G. Johnston
xplain automatically produces the explain output of a query that is running for reals. The effect is identical to running explain analyze except your output here is whatever the query would produce instead of the explain output, which instead goes into the log. David J.

Re: role "my_account" does not exist

2023-08-03 Thread David G. Johnston
g I am missing? > createuser has to login to the server to do its work. Whatever credentials or method you use to connect via psql (usually via sudo and the postgres o/s user) you need to use here as well. David J.

Re: Dropping all tables in a database

2023-08-06 Thread David G. Johnston
ql.org/docs/current/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN > > Otherwise, the solution is to do as you did: write the output to a file, > trim out any extraneous lines, and then use that as a script. > Or in psql execute it using the \gexec meta-command instead of a semi-colon. David J. >

Re: How to set default privilege for new users to have no access to other databases?

2023-08-10 Thread David G. Johnston
ges.html > and list their tables. > Requires being connected to the database being inspected. > My understanding is that this ability is inherited from the public role > (could use confirmation of this)? > Yes, public is what gets the default connection grant to newly created databases. David J.

Re: Dynamically accessing columns from a row type in a trigger

2023-08-12 Thread David G. Johnston
find the need. David J.

Re: Cast INTEGER to BIT confusion

2023-08-17 Thread David G. Johnston
red catalog column is that of the system bit type. Creating a user bit domaim is going to have absolutely zero impact on this situation. If you really want to make this work and are willing to risk and deal with side-effects of manual catalog updates you could maybe make the existing cast implicit. David J.

Re: To create or not to create that index

2023-08-17 Thread David G. Johnston
in a unique index, the CREATE INDEX command will fail but leave behind an “invalid” index. "Problem" includes you forcibly killing it while it is running. https://www.postgresql.org/docs/current/sql-createindex.html David J.

Re: To create or not to create that index

2023-08-17 Thread David G. Johnston
On Thu, Aug 17, 2023 at 8:43 PM Stefan Knecht wrote: > But that "invalid" index is being used by queries > >> >> Please don't top-post. If it is used by queries it isn't invalid and thus its existence shouldn't be surprising. So I'm not sure what you are saying. David J.

Re: PG minor version in data directory?

2023-08-18 Thread David G. Johnston
On Fri, Aug 18, 2023 at 6:36 PM Justin Clift wrote: > If the minor version is already tracked somewhere as well, that > would be extremely useful for my use case. > > The data directory doesn't have a concept of "minor version". Only the installed libraries and binaries do. David J.

Re: The same prepared query yield "-1" the first six times and then "-1.0"

2023-08-21 Thread David G. Johnston
blem? > Use the type appropriate getter, not getString, to retrieve the value of the underlying real typed column. Otherwise, I agree this seems like a bug, probably in the JDBC driver, though one pertains to style as opposed to semantics since both answers are technically correct. David J.

Re: EXPLAIN statement can also apply to SELECT INTO.

2023-08-21 Thread David G. Johnston
execution plan you wish to see. > >>> > > seems you can use it with SELECT INTO. > > explain (ANALYZE, BUFFERS, TIMING, VERBOSE ON, BUFFERS ON, WAL ON,SETTINGS > ON) > select count(*) as cnt INTO s from tenk1; > > We try not to encourage such things. And CTAS is listed. David J.

Re: PL/pgSQL RETURN QUERY and DOMAIN CHECKs

2023-08-23 Thread David G. Johnston
+---+ > 57 *** | (4,5) | > 58 *** +---+ > 59 *** (1 row) > 60 *** > The above (and the type definition...) is all that is relevant for the bug report. Once you've gotten a value of some type nothing else in the system that is simply passed that value is going to reevaluate the constraints. David J. >

Re: Role for just read the data + avoid CREATE / ALTER / DROP

2023-08-25 Thread David G. Johnston
ginates in order to know your options for removing it. In this case the grant to the public group that all roles are a member of. David J.

Re: ident auth does not works as usual

2023-08-26 Thread David G. Johnston
conf > > test rootcce > > > and login pg via root user , it doesnt work > You are saying root os user can login as pg role cce but that line of the pg_hba.conf doesn’t permit cce to login. In short, the mapping is useless. David J.

Re: ident auth does not works as usual

2023-08-27 Thread David G. Johnston
On Sunday, August 27, 2023, pan snowave wrote: > Hi > > "Show your psql command that is failing." > > [root@~ pg]# /usr/local/pgsql/bin/psql -p5432 -d db1 -h127.0.0.1 > psql: error: connection to server at "127.0.0.1", port 5432 failed: FATAL: > Ident authentication failed for user "root"

Re: ident auth does not works as usual

2023-08-28 Thread David G. Johnston
ou can specify a db role name via the cli or libpq) psql -U cce -h 127.0.0.1 -d db1 Keep in mind you could very well have two lines in your pg_ident.conf file: test root cce test root ddf David J.

Re: Postgres service is not starting

2023-08-28 Thread David G. Johnston
- start from scratch with the software and then restore your backups. I have no idea how you’d expect the software to run if you remove its configuration file. You should undo that. David J.

Re: event trigger clarification

2023-08-30 Thread David G. Johnston
command is executed within a block, I would like to know if > the event trigger fires when the line is executed or at commit time. > https://www.postgresql.org/docs/current/event-trigger-definition.html There is nothing there about event execution being able to be deferred. David J.

Re: PSQL = Yes ... JDBC = no ??

2023-09-03 Thread David G. Johnston
f that it is documented to do are only doable by it in many cases, and in all cases are done locally, not by the server. You cannot send those meta-commands to the server, it has no clue what to do with them. And since you are using JDBC you by definition aren’t using psql. David J.

Re: rollback to savepoint issue

2023-09-04 Thread David G. Johnston
and wasn’t a syntax, or runtime, error? Plus, the error is syntax, usually when you try something that exists but is disallowed the system gives you some kind of invalid state exception at runtime, David J.

Re: ./configure doesn't make effect?

2023-09-05 Thread David G. Johnston
ranscript, your description is unclear. David J.

Re: Huge input lookup exception when trying to create the index for XML data type column in postgreSQL

2023-09-07 Thread David G. Johnston
ot all that familiar with them but they were designed for non-atomic data values. David J.

Re: pgsql --echo-errors --quiet and setval

2023-09-08 Thread David G. Johnston
lue of a sequence is not an error. > The output of SELECT queries cannot be quieted, only redirected. David J.

Re: pgsql --echo-errors --quiet and setval

2023-09-10 Thread David G. Johnston
t is producing, I doubt it for the reason mentioned. It isn't difficult to add "> /dev/null" to the command line if that is what you want - no need to touch scripts given a capable enough shell. David J.

Re: trouble restoring a database backed up with pg_dump/pg_dump_all - relations are created in the wrong order

2023-09-18 Thread David G. Johnston
ns are black-boxes, it is not possible to establish dependencies between them. This limitation is why many of the rules I allude to above exist. You have also not mentioned what version you are working with. David J.

Re: [EXT]Re: Connection not allowed because of an error 'Not in pg_hba.conf'

2023-09-20 Thread David G. Johnston
d be trying harder to isolate this down to a reproducible test case and thus be able to provide more information without it being too much. David J.

Re: Changed functionality from 14.3 to 15.3

2023-09-20 Thread David G. Johnston
tion also suggests that maybe the v14 instance has altered default privileges setup that maybe the v15 doesn't have. David J.

Re: Changed functionality from 14.3 to 15.3

2023-09-20 Thread David G. Johnston
On Wed, Sep 20, 2023 at 2:48 PM Michael Corey wrote: > How can I check the default privileges? > \ddp https://www.postgresql.org/docs/current/catalog-pg-default-acl.html David J.

How to fork pg_dump or psql w/o leaking secrets?

2023-09-22 Thread David G. Johnston
in, I would discourage you to fork psql. Would you be able to > maintain the new upcoming versions in the future? > > The OP seems to be used the term fork in a process sense, not forking the source code. Process execution from within another program. “Launch” or “execute” psql would be a better choice of wording here. David J.

Re: How to fork pg_dump or psql w/o leaking secrets?

2023-09-22 Thread David G. Johnston
SQL prompts for a password when not using these mechanism, > so does my tool. > Once you have the password you should utilize the PGPASSWORD environment variable to get it passed to psql. It doesn’t matter in the least how you obtained that password in the first place. David J.

Re: How to fork pg_dump or psql w/o leaking secrets?

2023-09-22 Thread David G. Johnston
ec"d > tool. > > Much safer than plain-text passwords floating around env-vars or > temp-files. --DD > Sure, though maybe just some kind of “—password-on-stdin” option and then the next input read from stdin is interpreted as the password, would be more readily accomplished. Scripts should be sent via “—file” in that usage but that seems desirable anyway. David J.

Re: How to investigate deadlocks

2023-10-02 Thread David G. Johnston
/row access ordering, and figure out where you have the same pairs of tables being accessed but in different orders. David J.

Re: Peer authentication failed ???

2023-10-03 Thread David G. Johnston
cation > failed for user "my_group_worker**"* > > *** What am I doing wrong? > postgres != my_group_worker and you haven’t setup an ident mapping to associate the two David J.

No yum repo for CentOS 7 and postgres 16?

2023-10-05 Thread David G. Johnston
ld from source? > > https://yum.postgresql.org/news/rhel7-postgresql-rpms-end-of-life/ David J.

Re: why generated columsn cannot be used in COPY TO?

2023-10-06 Thread David G. Johnston
ng “the fast > option” so adding the column which can be regenerated is overhead. This question and statement makes zero sense to me. If you specify the column name you’d get the values of that column like always. I’m good, though, with the columns you can choose being a strict subset of those that are output when you do not list any. Writing a select query to get a faithful reproduction of the entire table’s contents is fine for an API. David J.

Re: why generated columsn cannot be used in COPY TO?

2023-10-06 Thread David G. Johnston
esn't make sense to specify data for inbound generated data. So while we do have a POLA violation here the desirability to now fix it years later is basically zero. And the current behavior is at least defensible and consistent. And there is a very easy way to get the desired output making any change that much harder a sell. The error message maybe could use some help though, and if there isn't a hint maybe add one. David J.

Re: why generated columsn cannot be used in COPY TO?

2023-10-06 Thread David G. Johnston
On Friday, October 6, 2023, Tom Lane wrote: > "David G. Johnston" writes: > >> On 10/6/23 08:45, Ron wrote: > >>> Nah. "The programmer -- and DBA -- on the Clapham omnibus" quite > >>> reasonably expects that COPY table_name TO (output

Re: JSON fields with backslashes

2023-10-13 Thread David G. Johnston
t you need to use a different tool. Ideally you can just get the JSON into whatever client software you are writing with and export it from there. Doing it in psql is possible but a bit tricky. Doing it within the server usually isn't worth the hassle. David J.

Re: right way of using case-expressions in plpgsql functions

2023-10-15 Thread David G. Johnston
valuated. Nothing the optimizer does will change that. The planner for the function internals does not know whether px will or will not be null on any given invocation. David J.

Re: Inheritance in PostgreSQL

2023-10-17 Thread David G. Johnston
r good reasons. Stick with relational models in a relational database. Also of note: https://wiki.postgresql.org/wiki/Don%27t_Do_This#Don.27t_use_varchar.28n.29_by_default I'm tempted to add "Don't use inheritance" to that page...but fortunately it doesn't come up that often. David J.

Re: Inheritance in PostgreSQL

2023-10-17 Thread David G. Johnston
On Tue, Oct 17, 2023 at 3:33 PM Jeff Laing wrote: > “Don’t use table inheritance” IS on that page > > > Indeed - oddly under "tool usage"...along with rules and, an actual tool, psql -W David J.

Re: postgres keeps having blocks

2023-10-18 Thread David G. Johnston
ossible to give advice without knowing what you told it to do. You should put more effort into showing others what your app is doing and how you are debugging it and the database. Killing sessions without changing anything else is unlikely to result in a change of behavior. David J.

Re: How can I accurately infer the output of a SELECT statement FROM a table with floating-point data type?

2023-10-18 Thread David G. Johnston
gives the minimum as clarified in the prose. There is room in the table to include more detail and it probably should. David J.

Re: My question about the transaction

2023-10-19 Thread David G. Johnston
nsert into t values (1); > INSERT 0 1 > postgres=# begin; > BEGIN > Session one can see this row and modify it just fine… David J.

Re: My question about the transaction

2023-10-19 Thread David G. Johnston
autocommit on and incorporate explicit begin/commit commands into the script if you want to demonstrate concurrency behavior. David J.

Re: setting up streaming replication

2023-10-24 Thread David G. Johnston
cluster from scratch. David J.

Re: purpose of an entry in pg_hba.conf file

2023-10-25 Thread David G. Johnston
.conf entry added to permit those connections. All trust connections in pg_hba.conf should be removed from it as quickly as possible. David J.

Re: PgAmin view

2023-10-26 Thread David G. Johnston
you start the PgAmin? > > Test it with a view that takes seconds to run. David J.

Re: Prepared statements plan_cache_mode considerations

2023-10-26 Thread David G. Johnston
ups, would simply be assumed better off done with a generic plan involving an index scan (maybe based upon a table size check) derived from the initial custom plan. David J.

Re: Differences between database objects (tables, triggers, sequences, functiions) and a sql file

2023-10-29 Thread David G. Johnston
of. You can find stuff that, once you've executed the script you can compare that database to some other and find differences. David J. > >

Re: Inefficient query plan for SELECT ... EXCEPT ...

2023-10-31 Thread David G. Johnston
e an optimization to attempt. David J.

<    12   13   14   15   16   17   18   19   20   21   >