Hi all!
In a scenario like this:
> =# create table tab1(text1 text default 'from table');
>
> =# create procedure ins_tab1(p_text1 text default 'from proc') language
sql as
> -# $$
> $# insert into tab1(text1) values (p_text1);
> $# $$;
>
> =# call ins_tab1 (null);
>
> =# select * from tab1 ;
>
Hi!
I want to check if I pass the parameter "param1" to a sql script
"delme.sql" like
```
\if ':param1'
\echo :param1;
\else
\prompt 'Param1? ' :param1
\endif
select :'param1';
```
if parameter `param1` is not passed, the .sql should ask for it.
If I run something like
`psql -f delme.sql -v pa
Hi Adrian,
yes, of course, that is what I meant: being able to tell psql to exclude
some patterns from being stored in the .psql_history file
On Tue, 18 Jun 2024 at 16:12, Adrian Klaver
wrote:
> On 6/17/24 23:45, Wiwwo Staff wrote:
> > Hi!
> > As a big history lover, it would b
Hi!
As a big history lover, it would be great to have the HISTIGNORE
functionality added to psql.
Have a great day!
Wiwwo
Hi Community!
I am in the process of re-writing SQLs in app code to a more DB side
approach.
My first idea was to write views, and let the app query those views; i'd
need to rewrite some queries to expose the "parameters" (where condition
fields) of those queries in the select part, to expose them
On Tue, 13 Feb 2024 at 14:49, David G. Johnston
wrote:
> On Tuesday, February 13, 2024, Wiwwo Staff wrote:
>
>> Hi!
>> I am implementing a queue using PostgreSQL.
>> I am of course using "FOR UPDATE SKIP LOCKED".
>>
>> Is there any way I can t
Hi!
I am implementing a queue using PostgreSQL.
I am of course using "FOR UPDATE SKIP LOCKED".
Is there any way I can tell PostgreSQL to only "operate" on the locked row,
and/or a way to reference it?
Some explanations of what I mean:
- I have a table with N rows
- I lock row X with a PG F
Hi!
Provided my replication user created with
CREATE USER repl_user REPLICATION LOGIN ENCRYPTED PASSWORD'';
If I run pg_rewing referring to this user
postgres@host1:~: pg_rewind -D $PGDATA --source-server="host=nre_primary
port=5432 user=repl_user passfile='/var/lib/postgresql/.pgpass'
dbname=
Sorry for the confusion, I must have done some crazy stuff about the user
of pg_basebackup.
Please just consider the question:
* is there a way to tell pg_rewind to use the passfile?
Thanks!
On Wed, Jan 25, 2023 at 10:37 AM Wiwwo Staff wrote:
> Hi!
> I have noticed, if I use
> pg_b
Hi!
I have noticed, if I use
pg_basebackup -D $PGDATA -h $NEW_PRIMARY -U $SOME_ADMIN_USER
(where $SOME_ADMIN_USER is a privileged user, not the replica user)
i got a "show primary_conninfo" as ;
user= passfile='/var/lib/postgresql/.pgpass'
channel_binding=prefer host=pg_red port=5432 sslmode=p
a flame war here, just humbly proposing...
Thanks all again!
On Tue, Jan 17, 2023 at 4:44 PM Adrian Klaver
wrote:
> On 1/17/23 07:35, Wiwwo Staff wrote:
> > Hi Laurenz,
> > thanks for your answer!
> > Ok, but I don't think "1663" is a sort of constant val
nz Albe
wrote:
> On Tue, 2023-01-17 at 15:48 +0100, Wiwwo Staff wrote:
> > Quick and to the point:
> >
> > If i execute
> > select pg_relation_filepath('pgbench_accounts');
> >
> > I get
> > pg_relation_filepath
> > ---
Hi!
Quick and to the point:
If i execute
select pg_relation_filepath('pgbench_accounts');
I get
pg_relation_filepath
--
base/5/16398
where "base" is tablespace, but not tablespace OID, nor tablespace name.
How do I link it to get from "base" the tablespace OID?
Or, in othe
Hi!
Happy new (gregorian calendar) year!
Somehow related to the proposal of having a `psql --idle` option, is there
a way to disallow the command `\!` (and anything of the likes in psql?
Sure, I can set the SHELL env var at run-time, but I still want to have
postgres user to be a normal user, wit
Hi there!
Is there (a way to have) a "monitoring only" role in PG?
This role should have access to stat views only,maybe something more, but
no access to data whatsoever.
Tnx!
Hi!
Is there any way to create a user allowed to connect to a/any read replica
only, as in "not allowed to connect to primary"?
Sorry to post solutions and links about alternative DBMSs, but I miss this
sort of "sudo" ad database user level:
https://oracle-base.com/articles/misc/proxy-users-and-connect-through
Is there any approach to achieve the same result in Postgresql?
Anyone sharing the need of this functionality?
Tn
Thanks all for the alternative solutions.
Yet, despite of my (wrong and misleading) use-case, I still share Julien's
view of this being useful, whatever the parameter or the use-case.
My 2 cents :-)
On Wed, Jul 27, 2022 at 2:49 PM Wiwwo Staff wrote:
> Since changing ph_hda.conf file
Since changing ph_hda.conf file to give users access involves the restart
of server, many companies I work(ed) use a bastion host, where users ssh
to, and are allowed "somehow" use postgresql.
Still, those users need some login shell.
It would be great to give them psql as a login shell (in /etc/
Hi!
i might be doing something wrong, but I cannot see what...
Server is 14.3 (Debian 14.3-1.pgdg110+1)
(at the time of writing, in Dockerfile FROM postgres:14)
I have a 3 node cluster, starting with pg_red (172.26.0.2) as primary.
I promote pg_green (172.26.0.4) as new primary, all other aligned
On Thu, 8 Jul 2021 at 21:42, Alban Hertroys
wrote:
> On 2021-07-08 13:30, Ron wrote:
> > Thus, the bigTable PK must be on id, columnX, (No, I don't like it
> > either.)
>
> That's not entirely true. You can keep the PK on id if you additionally
> create a unique constraint on (id, columnX).
>
Uh
Big big variability on partitioned column, which is filtered (where
condition) in (almost) all queries.
On Thu, 8 Jul 2021 at 14:23, Michael Lewis wrote:
> Why are you using hash partitioning?
>
Hi!
I have a big table bigTable which I partitioned by hash on field columnX,
by creating bigTable_0, bigTable_1 etc.
Since I need a PK on bigTable.id, and table is not partitioned by id, and
columnX is not unique, i added PK on bigTable_0.id, bigTable_1.id etc. So
far, so good.
Now I have another
23 matches
Mail list logo