pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedfeature requests
5+ messages / 5 participants
[nested] [flat]
* feature requests
@ 2007-07-08 15:16 Mike Gould <mgould@allcoast.net>
2007-07-08 15:54 ` Re: feature requests Michael Glaesemann <grzm@seespotcode.net>
0 siblings, 1 reply; 5+ messages in thread
From: Mike Gould @ 2007-07-08 15:16 UTC (permalink / raw)
To: pgsql-general
I would like to see a CREATE Variable dataname datatype added. The scope of these variables would be global. Along this same line I would like to see a way to have a trigger or rule fired upon connection initialization. This would allow for these type of variables to be SET along with other defaults that need to be setup on a per connection basis from the server side instead of the client application.
Best Regards,
Michael Gould
All Coast Intermodal Services, Inc.
904-376-7030
_____
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
To: Naz Gassiep [mailto:naz@mira.net]
Cc: pgsql-general@postgresql.org
Sent: Sat, 07 Jul 2007 19:50:03 -0400
Subject: Re: [GENERAL] Changing DB Encodings
Naz Gassiep <naz@mira.net> writes:
> Tom Lane wrote:
>> No, that implies a lack of error checking.
> Surely, then, that's a bug? Shouldn't postmaster check if a DB is in an
> encoding that differs from the selected locale?
Yeah, it should. Whether it can is a different question.
Part of the problem here is the lack of a reliable way to tell
*which* encoding is implied by a locale. On some systems you
can get a poorly-standardized string name for the locale's encoding;
on others you can't get anything.
There's been some experimental code in initdb for awhile now that tries
to guess encoding from locale. I have not heard reports of it failing
lately, so maybe we could promote it into a hard error check, or at
least a backend-side warning at CREATE DATABASE time. It still won't
help on old systems without nl_langinfo(CODESET), though. (But how
many of those are left? That call is specified by the Single Unix
Spec. Anybody know if it works on Windows?)
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: feature requests
2007-07-08 15:16 feature requests Mike Gould <mgould@allcoast.net>
@ 2007-07-08 15:54 ` Michael Glaesemann <grzm@seespotcode.net>
0 siblings, 0 replies; 5+ messages in thread
From: Michael Glaesemann @ 2007-07-08 15:54 UTC (permalink / raw)
To: fasupport@allcoast.net; +Cc: pgsql-general
[Please start a new message rather than replying to an old one to
start a new topic.]
On Jul 8, 2007, at 10:16 , Mike Gould wrote:
> I would like to see a CREATE Variable dataname datatype added. The
> scope of these variables would be global.
CREATE TABLE global_int_variables
(
global_int_variable TEXT PRIMARY KEY
, global_int_value INTEGER NOT NULL
);
-- set a new variable
INSERT INTO global_int_variables (global_int_variable,
global_int_value) VALUES ('foo', 42);
-- get current value
SELECT global_int_value FROM global_int_variables WHERE
global_int_variable = 'foo';
-- assign a new value to an existing variable
UPDATE global_int_variables SET global_int_value = 3 WHERE
global_int_variable = 'foo';
-- undefine a variable
DELETE FROM global_int_variables WHERE global_int_variable = 'foo';
You can also wrap these in functions for convenience (untested):
CREATE FUNCTION set_global_int(p_var TEXT, p_val INTEGER) RETURNS VOID
LANGUAGE plpgsql AS $_$
BEGIN
UPDATE global_int_variables
SET global_int_value = p_val
WHERE global_int_variable = p_var;
IF NOT FOUND THEN
INSERT INTO global_int_variables (global_int_variable,
global_int_value)
VALUES (p_var, p_val);
END IF;
RETURN;
END
$_$;
CREATE FUNCTION get_global_int(TEXT) RETURNS INTEGER
LANGUAGE SQL as $_$
SELECT global_int_value FROM global_int_variables WHERE
global_int_variable = $1;
$_$;
CREATE FUNCTION undef_global_int(TEXT) RETURNS VOID
LANGUAGE SQL as $_$
DELETE FROM global_int_variables WHERE global_int_variable = $1;
$_$;
test=# SELECT set_global_int('foo', 5);
set_global_int
----------------
(1 row)
test=# SELECT get_global_int('foo');
get_global_int
----------------
5
(1 row)
test=# SELECT get_global_int('bar');
get_global_int
----------------
(1 row)
test=# SELECT set_global_int('bar', 9);
set_global_int
----------------
(1 row)
test=# SELECT get_global_int('bar');
get_global_int
----------------
9
(1 row)
test=# SELECT set_global_int('bar', 10);
set_global_int
----------------
(1 row)
test=# SELECT get_global_int('bar');
get_global_int
----------------
10
(1 row)
test=# SELECT undef_global_int('bar');
undef_global_int
------------------
(1 row)
test=# SELECT get_global_int('bar');
get_global_int
----------------
(1 row)
> Along this same line I would like to see a way to have a trigger or
> rule fired upon connection initialization. This would allow for
> these type of variables to be SET along with other defaults that
> need to be setup on a per connection basis from the server side
> instead of the client application.
If you want the variables to be used on a per-connection basis,
you'll want to use TEMP tables. As for setup per connection, you may
be able to do something with a psqlrc file if using psql. Otherwise I
believe you'll need to handle this setup yourself (which I believe
could be someone fully automated using stored procedures). I know
this has come up on the lists before but I don't recall the specifics
of the discussion (e.g., if it's been decided that this isn't
something that will be added to PostgreSQL or whether no one's made a
specific proposal). You may want to search the archives for more
information.
Michael Glaesemann
grzm seespotcode net
^ permalink raw reply [nested|flat] 5+ messages in thread
* Feature Requests
@ 2020-10-25 09:26 Nikolai Lusan <nikolai@lusan.id.au>
2020-10-25 11:07 ` Re: Feature Requests Andreas Kretschmer <andreas@a-kretschmer.de>
2020-10-26 17:03 ` Re: Feature Requests Magnus Hagander <magnus@hagander.net>
0 siblings, 2 replies; 5+ messages in thread
From: Nikolai Lusan @ 2020-10-25 09:26 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Hi,
I was wondering where I can see open feature requests. One I would like
to see is multi-master replication ... I did find a 2016 request that
was marked as "planned", but to the best of my knowledge it hasn't made
production yet.
- --
Nikolai Lusan <nikolai@lusan.id.au>
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEVfd4GW6z4nsBxdLo4ZaDRV2VL6QFAl+VRLYACgkQ4ZaDRV2V
L6SLPRAArH5dTHFvTFiO9C5SGyguz+ez4OOt7fA16pT+WZIz694mko6rMxUz+hlb
RnNV6z5huC5EMcjFL6RHBg/Tx4hKIdidARLvTGycTML66iIpTTngdLueQX8YnLZ1
9/hLIv14Ms7vA1VAhjromhcZeUQD18BBpmoLy4Kk+drIQHs8viCfeaX5PKUOggT6
tUOTZGf0fMqwQHNhmtT22qa3FCHWYI2zReSZ1hscKgwxjTnOhArqhq5dW1+IdrBE
fsZ8qKUBtO25CN7dbgT6E1znrFPieMELhh9b9AJ5IsXMNUqtPoXvVFyW9ZrUoTHB
GeVbHLEtEFhbyLoVyfgfgCbWcorrew6/Dv24Xq/GZheVfuyRZTcIWIfiKaFFI0vc
xyFz1CxHs1ZRWvNaC8YJPLPIESUEuWtJWyFxf1TK0rxxXVf11eg/p54eZUjbNlAA
vUCDSMMnTVcInepcvAj88PuRldcy0x/4dgr92oRdBzmHSo1IHGrcEAKxd8+GK/a8
Ox5DgoZCvjGOyjQD/P859ScxB+WuIeF/+oujSDRHBF+YG/pDH73RhuH2/IfbvhqU
AEdvRnuJyb93fuQ/j58mP2bKg/7aU/ECvghelzmT8pj+H1xYKEVxRugy1SOWth7A
/r2/GveuyIBSD1v/026wbkSK+cwc0bq1uTjHJqCJtrUlni6Jm60=
=pz31
-----END PGP SIGNATURE-----
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Feature Requests
2020-10-25 09:26 Feature Requests Nikolai Lusan <nikolai@lusan.id.au>
@ 2020-10-25 11:07 ` Andreas Kretschmer <andreas@a-kretschmer.de>
1 sibling, 0 replies; 5+ messages in thread
From: Andreas Kretschmer @ 2020-10-25 11:07 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
Am 25.10.20 um 10:26 schrieb Nikolai Lusan:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
>
> Hi,
>
> I was wondering where I can see open feature requests. One I would like
> to see is multi-master replication ... I did find a 2016 request that
> was marked as "planned", but to the best of my knowledge it hasn't made
> production yet.
>
>
> - --
> Nikolai Lusan <nikolai@lusan.id.au>
Multi-Master exists with BDR, but it's not OpenSource. If you need more
information, contact me private.
Regards, Andreas
--
2ndQuadrant - The PostgreSQL Support Company.
www.2ndQuadrant.com
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Feature Requests
2020-10-25 09:26 Feature Requests Nikolai Lusan <nikolai@lusan.id.au>
@ 2020-10-26 17:03 ` Magnus Hagander <magnus@hagander.net>
1 sibling, 0 replies; 5+ messages in thread
From: Magnus Hagander @ 2020-10-26 17:03 UTC (permalink / raw)
To: nikolai@lusan.id.au; +Cc: pgsql-general <pgsql-general@lists.postgresql.org>
On Sun, Oct 25, 2020 at 10:26 AM Nikolai Lusan <nikolai@lusan.id.au> wrote:
> Hi,
>
> I was wondering where I can see open feature requests. One I would like
> to see is multi-master replication ... I did find a 2016 request that
> was marked as "planned", but to the best of my knowledge it hasn't made
> production yet.
>
PostgreSQL does not have such a thing as "open feature requests".
You can find patches that are currently being worked on at
https://commitfest.postgresql.org/, or on discussions in the list archives.
--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/;
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/;
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2020-10-26 17:03 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-07-08 15:16 feature requests Mike Gould <mgould@allcoast.net>
2007-07-08 15:54 ` Michael Glaesemann <grzm@seespotcode.net>
2020-10-25 09:26 Feature Requests Nikolai Lusan <nikolai@lusan.id.au>
2020-10-25 11:07 ` Re: Feature Requests Andreas Kretschmer <andreas@a-kretschmer.de>
2020-10-26 17:03 ` Re: Feature Requests Magnus Hagander <magnus@hagander.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox