Re: [GENERAL] Equivalence Classes when using IN

2017-10-10 Thread Nico Williams
RFs > involved. Or where the order is meaningful to an aggregate function applied to columns of a view result set. I'm not sure what the full set of cases where the ORDER BY on the inner query is meaningful, but I'm sure there are cases it is not. If there are no such constr

Re: [GENERAL] Postgresql CDC tool recommendations ?

2017-10-06 Thread Nico Williams
t this to improve with PG 10 logical replication. You can easily add the bit that pushes those JSON texts to Kafka. Nico -- -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] time series data

2017-10-02 Thread Nico Williams
table that gives you rows that summarize each call - both: store the events and the summaries of the calls You might have an events table with AFTER INSERT triggers to insert or update the corresponding rows in the calls table. Nico -- -- Sent via pgsql-general mailing list (pgsql

[GENERAL] COMMIT TRIGGER implementation using CONSTRAINT TRIGGERs

2017-09-14 Thread Nico Williams
ommit triggers are a reasonable and desirable feature. Cheers, Nico -- -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Aquameta 0.1 - Request for reviews, contributors

2017-09-08 Thread Nico Williams
have several layers of trigger functions creating more trigger functions, as you can easily nest $foo$-quoted string literals by having different quote forms for each level. Also, I used exists() instead of count(*) = 1 -- that's just my personal preference, and a less defensible style ma

Re: [GENERAL] Schema/table replication

2017-09-06 Thread Nico Williams
On Wed, Sep 06, 2017 at 08:22:14AM -0700, Steve Atkins wrote: > > On Sep 6, 2017, at 6:00 AM, Marcin Giedz wrote: > > > > Hi, is there any way (3rd party software) to replicate particular > > schema/table not the whole database with streaming replication built-in > > mechanism ? > > I don't be

Re: [GENERAL] Create Action for psql when NOTIFY Recieved

2017-09-05 Thread Nico Williams
On Tue, Sep 05, 2017 at 08:19:13AM -0700, Steve Atkins wrote: > > On Sep 4, 2017, at 10:25 PM, Nico Williams wrote: > > On Mon, Sep 4, 2017 at 4:21 PM Steve Atkins wrote: > > > https://github.com/wttw/pgsidekick [BTW, I must say I like pgsidekick, but for the use of the p

Re: [GENERAL] Create Action for psql when NOTIFY Recieved

2017-09-04 Thread Nico Williams
timeouts. But i agree that timeouts and keepalives would be nice, and even invoking a given SQL function would be nice. But the question i have is: how to get such functionality integrated into PostgreSQL? Is a standalone program (plus manpage plus Makefile changes) enough, or would a psql \wait command be better? Nico -- > >

Re: [GENERAL] Create Action for psql when NOTIFY Recieved

2017-09-03 Thread Nico Williams
On Sun, Sep 03, 2017 at 05:37:57PM -0500, Nico Williams wrote: > What would it take to have pqasyncnotifier [0] adopted by PostgreSQL? Maybe it should be named pqasynclisterner. A \wait command for psql could do the same thing. I could probably write such a patch at some point if ther

Re: [GENERAL] Create Action for psql when NOTIFY Recieved

2017-09-03 Thread Nico Williams
yncnotifier solves all the problems that psql has regarding LISTENing for notifications. Note too that pqasyncnotifier doesn't poll, rather, it blocks in PQconsumeInput(). [0] https://github.com/twosigma/postgresql-contrib/blob/master/pqasyncnotifier.c (Oy, I just noticed that the PQfinnis

Re: [GENERAL] Create Action for psql when NOTIFY Recieved

2017-09-03 Thread Nico Williams
n that channel. I might modify pqasyncnotifier to either truncate payloads at newlines, or escape/remove newlines so that it could be safer to use the payloads. I would like to see PostgreSQL adopt this program! Nico -- -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Strange SQL result - any ideas.

2017-09-03 Thread Nico Williams
> the right place - this at least I understand - the first character of > each line is sorted by its ASCII value - '[' comes before ']' (naturally) > and '{' comes after them both - or have I got that right? > > But, I do *_not_* understand why my table data is now out > of sort order - I've looked at it and can't see *_how_* the sort > order in my table data has been determined. UNION means "filter out duplicates", which may be implemented via a hash table that doesn't preserve insertion order. Nico -- -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Can not change log_min_duration_statement parameter on PG 8.2.4

2010-07-19 Thread Nico
tion_statement to 2500; SET postgres=# SHOW log_min_duration_statement ; log_min_duration_statement 2500ms (1 ligne) Am I missing something ? Thanks for your help ! Nico -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Delphi connection ?

2009-09-27 Thread Nico Callewaert
Thank you to all for the interesting replies ! Best regards, N. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Delphi connection ?

2009-09-25 Thread Nico Callewaert
Many thanks in advance, Best regards, Nico Callewaert

Re: [GENERAL] I can't drop a user if I don't drop his grants beforehand??????????????????

2009-05-29 Thread Nico Sabbi
Alvaro Herrera ha scritto: Nico Sabbi wrote: Hi, i can't believe my eyes. Why on earth I can't drop a user without previously revoking his privileges? This is really _crazy_ in my opinion. I'm not speaking of object ownership, but of GRANTs. As Tom says, it'

Re: [GENERAL] I can't drop a user if I don't drop his grants beforehand??????????????????

2009-05-22 Thread Nico Sabbi
Tom Lane ha scritto: Nico Sabbi writes: i can't believe my eyes. Why on earth I can't drop a user without previously revoking his privileges? Yeah, it's a known limitation. The reason it's not implemented is that some of the privileges may be in other d

[GENERAL] I can't drop a user if I don't drop his grants beforehand??????????????????

2009-05-22 Thread Nico Sabbi
Hi, i can't believe my eyes. Why on earth I can't drop a user without previously revoking his privileges? This is really _crazy_ in my opinion. I'm not speaking of object ownership, but of GRANTs. Why? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to you

Re: [GENERAL] After Upgrade from 8.2.6 to 8.3.6: function to_timestamp does not exist

2009-03-05 Thread Nico Grubert
If you're going to truncate the NOW(), just go with CURRENT_DATE instead. Thanks for the "CURRENT_DATE" tip, Adam. Works fine! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] After Upgrade from 8.2.6 to 8.3.6: function to_timestamp does not exist

2009-03-05 Thread Nico Grubert
OK, so you want to see if a timestamp is greater than now()? Why not just compare them? where a.from_datetime >= now() No, not the whole timestamp. I dont want to check the time. So I had to truncate the datetime with: date_trunc('day', a.from_datetime) >= date_trunc('day', NOW()) -- Sent

Re: [GENERAL] After Upgrade from 8.2.6 to 8.3.6: function to_timestamp does not exist

2009-03-05 Thread Nico Grubert
This query makes little sense. Why are you trying to convert a timestamp to a timestamp? Is this a bizarre substitute for date_trunc()? Got it: Thanks for the "date_trunc" tip. This query works fine: date_trunc('day', a.from_datetime) >= date_trunc('day', NOW()) -- Sent via pgsql-general m

Re: [GENERAL] After Upgrade from 8.2.6 to 8.3.6: function to_timestamp does not exist

2009-03-05 Thread Nico Grubert
ve all records whose "from_datetime" is e.g. >= 2009/05/06 (Now()) so I'd like to get results with a "from_datetime" like e.g. - 2009/05/06 00:05:00 - 2009/05/06 23:30:00 - 2009/05/07 10:15:00 Regards Nico -- Sent via pgsql-general mailing list (pgsql-general@postgresql

[GENERAL] After Upgrade from 8.2.6 to 8.3.6: function to_timestamp does not exist

2009-03-05 Thread Nico Grubert
p" function not supported anymore in 8.3.6? I could not read anything about it in the 8.3 documentation. Regards Nico -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Function parameter

2009-02-24 Thread Nico Callewaert
- Original Message - From: "John DeSoi" To: "Nico Callewaert" Cc: Sent: Wednesday, February 25, 2009 1:52 AM Subject: Re: [GENERAL] Function parameter On Feb 24, 2009, at 5:10 PM, Nico Callewaert wrote: I'm trying to modify an input parameter of

[GENERAL] Function parameter

2009-02-24 Thread Nico Callewaert
variable and assign that input parameter to it ? Many thanks in advance, Nico Callewaert

Re: [GENERAL] Elapsed time between timestamp variables in Function

2009-02-05 Thread Nico Callewaert
Thanks a lot to everybody for the help ! - Original Message - From: "Osvaldo Kussama" To: "Nico Callewaert" Cc: Sent: Thursday, February 05, 2009 2:59 AM Subject: Re: [GENERAL] Elapsed time between timestamp variables in Function 2009/2/4 Nico Callewaert :

[GENERAL] Elapsed time between timestamp variables in Function

2009-02-04 Thread Nico Callewaert
hanks in advance ! Nico

Re: [GENERAL] case dumbiness in return from functions

2008-01-18 Thread Nico Sabbi
Tom Lane ha scritto: Ivan Sergio Borgonovo <[EMAIL PROTECTED]> writes: After discovering that pg_get_serial_sequence behaves in a bit strange way[1] when it deals to case sensitiveness The SQL standard specifies that unquoted identifiers are case-insensitive. You're welcome to spell th

Re: [GENERAL] Inconsistence in transaction isolation docs

2007-10-16 Thread Nico Sabbi
Albe Laurenz ha scritto: Nico Sabbi wrote: /From: http://www.postgresql.org/docs/8.2/interactive/transaction-iso.html " Read Committed/ [...] to me the above sentence sounds inconsistent: it's asserting that both 1) and 2) apply: 1) it never sees ... changes committed du

[GENERAL] Inconsistence in transaction isolation docs

2007-10-16 Thread Nico Sabbi
/From: http://www.postgresql.org/docs/8.2/interactive/transaction-iso.html " Read Committed/ is the default isolation level in PostgreSQL. When a transaction runs on this isolation level, a SELECT query sees only data committed before the query began; it never sees either uncommitted data or c

Re: [GENERAL] ORDER BY - problem with NULL values

2007-10-12 Thread Nico Sabbi
Stefan Schwarzer ha scritto: From 8.3 beta release notes: - ORDER BY ... NULLS FIRST/LAST I think this is what you want right? Yes, indeed. Sounds great. unfortunately I am on 8.1. And wouldn't really want to migrate to 8.3 and beta for the moment order by 1 ? ---

Re: [GENERAL] row->ARRAY or row->table casting?

2007-10-01 Thread Nico Sabbi
Gregory Stark ha scritto: "Nico Sabbi" <[EMAIL PROTECTED]> writes: nb1=# select r.a from (select row(tab1.*)::tab1 as r from tab1)x; ERROR: missing FROM-clause entry for table "r" LINE 1: select r.a from (select row(tab1.*)::tab1 as r from tab1)x;

Re: [GENERAL] row->ARRAY or row->table casting?

2007-09-28 Thread Nico Sabbi
Tom Lane ha scritto: Nico Sabbi <[EMAIL PROTECTED]> writes: is there any way to cast a generic row to an array or to a table type? "row(...)::composite_type" should work in 8.2 and up. regards, tom lane ---(

[GENERAL] row->ARRAY or row->table casting?

2007-09-28 Thread Nico Sabbi
Hi, is there any way to cast a generic row to an array or to a table type? The example is trivial, but it explains what I'm trying to do: nb1=# select * from tab1; a | t ---+--- 1 | a 2 | b 3 | c (3 rows) nb1=# select r from (select row(tab1.*) as r from tab1)x; r --- (1,a) (2,b) (3,c) (

[GENERAL] Can't SELECT from (INSERT ... RETURNING)

2007-07-18 Thread Nico Sabbi
es(112) returni... ^ Is this a bug or it's not even supposed to work in theory? Such a feature would be extremely useful to have. P.S. I know it's non-portable, but this is not a problem. Thanks, Nico ---(end of broadcast)

[GENERAL] REQUEST: option to auto-generate new sequences with CREATE TABLE (LIKE)

2007-07-18 Thread Nico Sabbi
postgres automatically generate a new sequence for every serial field would be splendid. I hope you will consider this feature for one of the future versions of Postgres. Thanks, Nico ---(end of broadcast)--- TIP 1: if posting/reading through

Re: [GENERAL] Some problem with warm standby server

2007-05-08 Thread Nico Sabbi
Simon Riggs wrote: then I updated the master with a batch of inserts, but after a while the slave stopped with these messages: LOG: restored log file "00010021" from archive LOG: record with zero length at 0/2148 LOG: invalid primary checkpoint record LOG: restored log

[GENERAL] Some problem with warm standby server

2007-04-27 Thread Nico Sabbi
econdary checkpoint record PANIC: could not locate a valid checkpoint record LOG: startup process (PID 19619) was terminated by signal 6 LOG: aborting startup due to startup process failure What did I do wrong? Is there any other procedure to follow to restart a stopped repli

Re: [GENERAL] Help setting up warm standby replication

2007-04-16 Thread Nico Sabbi
Nico Sabbi wrote: Merlin Moncure wrote: try link mode, not copy mode (-l). make sure you read about the -k switch. merlin replaced -c with -l, but the result was the same. I assume that with -k you mean the socket dir for postgres - since pg_standby doesn't seek to recognize

Re: [GENERAL] Help setting up warm standby replication

2007-04-16 Thread Nico Sabbi
Merlin Moncure wrote: try link mode, not copy mode (-l). make sure you read about the -k switch. merlin replaced -c with -l, but the result was the same. I assume that with -k you mean the socket dir for postgres - since pg_standby doesn't seek to recognize that switch - but I didn't ne

Re: [GENERAL] Help setting up warm standby replication

2007-04-16 Thread Nico Sabbi
Merlin Moncure wrote: On 4/16/07, Nico Sabbi <[EMAIL PROTECTED]> wrote: Is there any parameter that I have to pass to the second server to keep on requesting WALs? I still don't understand what instructs the server to continously request the master's logs. google pg_stand

Re: [GENERAL] Help setting up warm standby replication

2007-04-16 Thread Nico Sabbi
Tom Lane wrote: Nico Sabbi <[EMAIL PROTECTED]> writes: To begin with I followed the example of the docs: in the recovery.conf file of the slave instance I set restore_command = 'cp -av /var/lib/pgsql/data/pg_xlog/%f %p' Hm, it looks like you are try

[GENERAL] Help setting up warm standby replication

2007-04-14 Thread Nico Sabbi
n mechanism: will the slave server periodically call the recovery_command or do I have to setup a cronjob to instruct it to search updates? Sorry if these questions are stupid :) and thanks in advance. Nico ---(end of broadcast)--- TIP 6: explain analyze is your friend

[GENERAL] gmake Error "/libpython2.4.a: could not read symbols: Bad value" with ./configure --with-python

2007-02-15 Thread Nico Grubert
8.2.0/src' gmake: *** [all] Error 2 --- My system: + Suse Linux Enterprise Server 10.1 64-Bit + Postgresql-8.2.3 + Python 2.4.4 Any idea, what's going wrong here? Thanks in advance, Nico ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Sorting with DISTINCT ON

2007-01-08 Thread Nico Grubert
It does allow you to sort on both columns. SELECT DISTINCT ON (path) path, comment_id, created, title FROM bewertungen.tblcomments ORDER BY path, created Thank you very much. Works perfect! :-) ---(end of broadcast)--- TIP 3: Have you

[GENERAL] Sorting with DISTINCT ON

2007-01-08 Thread Nico Grubert
he first row of the duplicates. In this example: 17 /var/blue 2007-01-07 20:35:55.289713 Any title. Any idea, how I can solve my problem? Regards, Nico ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

[GENERAL] Logging in postgresql.conf - no SQL statements are logged

2006-11-10 Thread Nico Grubert
- Did I miss something? Kind regards, Nico ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly

[GENERAL] Monitoring Postgres - Get the SQL queries which are sent to postgres

2006-10-25 Thread Nico Grubert
sent to my postgres database? Thanks in advance, Nico ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

[GENERAL] Restarting Slony crashes Postgresql?

2006-08-17 Thread Nico
d to restart postgresql just after restarting Slony (and before it all crashes). Is it always necessary to restart Postgresql after restarting a Slony daemon ? (though, it doesn't seem necessary when the servers have not many connections) Any information will be

[GENERAL] Foreign key / performance question

2006-03-29 Thread Nico Callewaert
, for every foreign key, there is an index defined.  So, all these indexes has to be maintained.  Is that killing performance ?  What's the best practise : defining foreign keys or not ?   Thanks a lot, Nico Callewaert New Yahoo! Messenger with Voice. Call regular phones from your PC and

Re: [GENERAL] How to reset a sequence so it will start with 1 again?

2006-01-13 Thread Nico Grubert
Take a look at the docs, in particular the three-parameter version of setval and the is_called flag. http://www.postgresql.org/docs/current/interactive/functions- sequence.html Thanks Michael, SELECT setval('tblperson_id_seq', 1, false); will do exactly what I supposed to

[GENERAL] How to reset a sequence so it will start with 1 again?

2006-01-13 Thread Nico Grubert
id_seq', 1); INSERT INTO tblperson (name) VALUES ('test1'); INSERT INTO tblperson (name) VALUES ('test2'); INSERT INTO tblperson (name) VALUES ('test3'); UPDATE tblperson set id = id-1; test=# SELECT * from tblperson; id | name +--- 2 |

[GENERAL] Best programming language / connectivity for best performance

2006-01-09 Thread Nico Callewaert
Hi,   I was wondering what is the best database connectivity and programming language to get the best performance with PostgreSQL.  I'm currently working with Delphi, but I don't know if that is the best way to go ?   Many thanks in advance, Best regards,   Nico Callewaert Yah

[GENERAL] Re: [GENERAL] Sorting problems with SELECT * FROM table WHERE name LIKE 'Ö %'

2005-10-31 Thread Nico Grubert
he proper result should be: Eberer Ecü Edding Élie de Beaumont Emmer Any idea how I can solve this problem? Thank you very much in advance, Nico To complete the missing information, here are the variables set for the databases: add_missing_fromon archive_command unset

[GENERAL] Re: [GENERAL] Sorting problems with SELECT * FROM table WHERE name LIKE 'Ö %'

2005-10-30 Thread Nico Grubert
Ah, I found it: lc_collate: [EMAIL PROTECTED] lc_ctype: [EMAIL PROTECTED] ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

[GENERAL] Re: [GENERAL] Sorting problems with SELECT * FROM table WHERE name LIKE 'Ö %'

2005-10-30 Thread Nico Grubert
... but what locale is it using? (See LC_COLLATE and LC_CTYPE.) Can I find out out these settings in "phpPgAdmin"? Or can I use LC_COLLATE and LC_CTYPE in the SQL Query? ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ig

[GENERAL] Sorting problems with SELECT * FROM t able WHERE name LIKE 'Ö%'

2005-10-30 Thread Nico Grubert
Emmer The proper result should be: Eberer Ecü Edding Élie de Beaumont Emmer Any idea how I can solve this problem? Thank you very much in advance, Nico ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Installation on latest version of Suse Linux

2005-06-15 Thread Nico Callewaert
Hi !,   Thanks for all the tips   Best regards, Nico CallewaertScott Marlowe <[EMAIL PROTECTED]> wrote: On Wed, 2005-06-15 at 16:54, Nico Callewaert wrote:> Hi,> > I'm completely new to PostgreSQL. I don't have any idea how to> install it on a Suse Linux machin

[GENERAL] Installation on latest version of Suse Linux

2005-06-15 Thread Nico Callewaert
Hi,   I'm completely new to PostgreSQL.  I don't have any idea how to install it on a Suse Linux machine.  Could somebody provide me installation instructions ?   Many thanks in advance,   Nico Callewaert Discover Yahoo! Have fun online with music videos, cool games, IM & more. Check it out!

Re: [GENERAL] getting inherited table name

2001-09-06 Thread Nico
hing at all. No additional fields are required: SELECT c.*, c.tableoid, pgc.relname as city_type FROM cities c, pg_class pgc WHERE c.tableoid = pgc.oid regards Nico ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an

[GENERAL] Databases in Belgium

2001-07-10 Thread Nico Vaes
Hello, I'm looking for people in Belgium, who have any experience in working with Databases, so we can exchange views and experiences. Do you know such people (or maybe it's you), please contact me at [EMAIL PROTECTED] . Greetings Nico Vaes ---(end of

[GENERAL] functions for triggers: passing parameters

2001-03-09 Thread Nico
What is wrong? CREATE FUNCTION set_value(text) RETURNS OPAQUE AS ' DECLARE val ALIAS FOR $1; BEGIN NEW.inf := val; RETURN NEW; END; ' LANGUAGE 'plpgsql'; CREATE TABLE t1 ( id serial, info text ); CREATE TRIGGER t1_set_val BEFORE INSER

[GENERAL] inheritance and partial index: how to override constraints or default_values

2001-02-27 Thread Nico
IMHO, pg should use the last definition, rather than complaining. Or better, pg should check if they are of the same type, but however should always use the last constraint/default_value definition! (I am talking about father-son inheritance, and not multiple inheritance, where the attribute name conflict should be dealed separately) regards, nico

[GENERAL] terminal psql: wrong console keystrokes

2001-02-17 Thread Nico
Through Konsole, the Up, Down, Left, Right keys work properly, but through psql the keystrokes seem to be wrong: instead of up (for scrolling in the internel buffer) it appears ^[[A Down ^[[B Right ^[[C Left ^[[D Back_del (ok) Forward_del ^[[3~ It happened when I upgraded Mandrake from 7

[GENERAL] Set valued attributes ?

2000-07-25 Thread Nico D
Does anyone know how to make an attribute a collection of OIDs? I haven't found any reference of this object-oriented feature in Postgres online manuals. Please, let me know any hints/links or anything that could help me doing the following: === Assume that each row of tables is identified by OI

[GENERAL] ORDBMS vs OODBMS

2000-06-29 Thread Nico D
d thing is that it's closed-source and it's very commercial. The good thing in PostgreSQL is that it's open-source and is available everywhere. I hope to find a lot of more good points related to PostgreSQL. Regards Nico