Re: [GENERAL] Alternative to pgAdmin Postgres Manager that support pgagent (jobs)

2017-10-19 Thread John R Pierce
On 10/19/2017 8:14 PM, Adam Brusselback wrote: No other tool I have used will manage pgAgent jobs. they can be managed with SQL, the schema pgAgent uses really isn't that complicated.   each job is a row in a table, IIRC. there's also pg_cron,  I've never used it, but it is standalone, and

Re: [GENERAL] Alternative to pgAdmin Postgres Manager that support pgagent (jobs)

2017-10-19 Thread Adam Brusselback
I'm currently in the same boat that I wish there was something better for running jobs against Postgres than pgAgent. Using pgAdmin to manage my numerous jobs isn't the best experience i've ever had to say the least, but it does work. No other tool I have used will manage pgAgent jobs. I worked

Re: [GENERAL] Is it OK to create a directory in PGDATA dir

2017-10-19 Thread David G. Johnston
On Thu, Oct 19, 2017 at 5:32 PM, John R Pierce wrote: > On 10/19/2017 1:25 PM, Tomas Vondra wrote: > > Is it fine to create a subdir inside PGDATA and store our stuff > there, or will PG freak out seeing a foreign object. > > > PostgreSQL certainly does not check if there

Re: [GENERAL] Is it OK to create a directory in PGDATA dir

2017-10-19 Thread John R Pierce
On 10/19/2017 1:25 PM, Tomas Vondra wrote: Is it fine to create a subdir inside PGDATA and store our stuff there, or will PG freak out seeing a foreign object. PostgreSQL certainly does not check if there are unknown directories in the data directory, and it will not crash and burn. But it

Re: [GENERAL] Is it OK to create a directory in PGDATA dir

2017-10-19 Thread rakeshkumar464
Hey I am not the container guy. I agree with you 100%. -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

[GENERAL] tgrm index for word_similarity

2017-10-19 Thread Igal @ Lucee.org
Hello, I want to use Postgres for a fuzzy auto-suggest search field.  As the user will be typing their search phrase, Postgres will show a list of items that fuzzy-matches what they typed so far, ordered by popularity (ntile(20)) and distance, i.e. 1 - word_similarity(). I created a

Re: [GENERAL] Alternative to pgAdmin Postgres Manager that support pgagent (jobs)

2017-10-19 Thread John R Pierce
On 10/19/2017 3:15 PM, Juliano wrote: Omnidb looks nice, but, I guess doesn't support pgAgent as well, any suggestions? pgAgent isn't part of postgres, its part of pgAdmin. -- john r pierce, recycling bits in santa cruz -- Sent via pgsql-general mailing list

Re: [GENERAL] pgpass file type restrictions

2017-10-19 Thread Stephen Frost
Matt, * Desidero (desid...@gmail.com) wrote: > I agree that it would be better for us to use something other than LDAP, If you happen to be using Active Directory, then you should really be using Kerberos-based auth instead. AD includes both LDAP and a KDC and the LDAP half is really *not* the

[GENERAL] Alternative to pgAdmin Postgres Manager that support pgagent (jobs)

2017-10-19 Thread Juliano
Hi guys I've been struggling for long years to find an alternative Postgres Manager that can support pgAgent jobs like pgAdmin does. PgAdmin works fine, but, it is not good as Oracle Enterprise Manager or SQL Server Management Studio and there is a lot of bugs. The version 1 it is obsolete

Re: [GENERAL] Is it OK to create a directory in PGDATA dir

2017-10-19 Thread Igal @ Lucee.org
On 10/19/2017 1:25 PM, Tomas Vondra wrote: On 10/19/2017 09:58 PM, rakeshkumar464 wrote: In the container world, sometime the only persistent storage path (that is, storage outside container world) is PGDATA.> I don't want to be the "You're doing it wrong!" guy, but you're doing it wrong. If a

Re: [GENERAL] Is it OK to create a directory in PGDATA dir

2017-10-19 Thread Tomas Vondra
Hi, On 10/19/2017 09:58 PM, rakeshkumar464 wrote: > In the container world, sometime the only persistent storage path > (that is, storage outside container world) is PGDATA.> I don't want to be the "You're doing it wrong!" guy, but you're doing it wrong. If a container only gives you a single

[GENERAL] Is it OK to create a directory in PGDATA dir

2017-10-19 Thread rakeshkumar464
In the container world, sometime the only persistent storage path (that is, storage outside container world) is PGDATA. Is it fine to create a subdir inside PGDATA and store our stuff there, or will PG freak out seeing a foreign object. thanks -- Sent from:

Re: [GENERAL] Using Variables in Queries

2017-10-19 Thread Igal @ Lucee.org
On 10/19/2017 12:14 PM, Tom Lane wrote: "Igal @ Lucee.org" writes: My real query is for similarity here, so I'm testing different functions with the same value, e.g. SELECT item_name , similarity('red widget', item_name) , similarity(item_name, 'red widget')

Re: [GENERAL] Using Variables in Queries

2017-10-19 Thread Tom Lane
"David G. Johnston" writes: > On Thu, Oct 19, 2017 at 12:14 PM, Tom Lane wrote: >> FROM products, >> (values ('red widget'::text)) consts(target) >> WHERE similarity(target, item_name) > 0.25 >> ORDER BY target <<-> item_name >> >> PG 9.5 and up

Re: [GENERAL] Using Variables in Queries

2017-10-19 Thread David G. Johnston
On Thu, Oct 19, 2017 at 12:14 PM, Tom Lane wrote: > FROM products, > (values ('red widget'::text)) consts(target) > WHERE similarity(target, item_name) > 0.25 > ORDER BY target <<-> item_name > > PG 9.5 and up will flatten out cases like this to be exactly what you >

Re: [GENERAL] Using Variables in Queries

2017-10-19 Thread Tom Lane
"Igal @ Lucee.org" writes: > On 10/19/2017 8:44 AM, David G. Johnston wrote: >> Adding lots of new custom syntax to pure server-side parsed SQL is a >> non-trivial undertaking whose need is reduced by the alternatives so >> described (functions, DO block, PREPARE, psql). > I

Re: [GENERAL] Using Variables in Queries

2017-10-19 Thread Pavel Stehule
2017-10-19 20:11 GMT+02:00 Igal @ Lucee.org : > On 10/19/2017 8:44 AM, David G. Johnston wrote: > > ​PREPARE sqlquery AS​ SELECT * FROM products WHERE col1 LIKE $1 OR col2 > LIKE $1; > EXECUTE sqlquery('red widget'); > > This works, but requires `DEALLOCATE sqlquery` when you

Re: [GENERAL] Using Variables in Queries

2017-10-19 Thread Igal @ Lucee.org
On 10/19/2017 8:44 AM, David G. Johnston wrote: ​PREPARE sqlquery AS​ SELECT * FROM products WHERE col1 LIKE $1 OR col2 LIKE $1;  EXECUTE sqlquery('red widget'); This works, but requires `DEALLOCATE sqlquery` when you want to update it from what I've seen which is not very friendly.  

Re: [GENERAL] pgpass file type restrictions

2017-10-19 Thread Daniel Verite
Tom Lane wrote: > On many platforms, it's possible for other users to see the environment > variables of a process. So PGPASSWORD is really quite insecure. As said in https://www.postgresql.org/docs/current/static/libpq-envars.html "PGPASSWORD behaves the same as the password

Re: [GENERAL] Problems with the time in data type timestamp without time zone

2017-10-19 Thread rob stone
On Thu, 2017-10-19 at 10:28 -0400, américo bravo astroña wrote: > We are using two different programs within the same computer, a > program saves the data with date and time in the DB and we are doing > another program to retrieve that information with date and time to > generate reports, all

Re: [GENERAL] Using Variables in Queries

2017-10-19 Thread David G. Johnston
On Thu, Oct 19, 2017 at 8:21 AM, Igal @ Lucee.org wrote: > Is it still true (the posts I see on this subject are quite old) that I > can not do so in Postgres outside of a stored procedure/function? And if > so, what's the reason of not adding this feature? Seems very useful to

Re: [GENERAL] Using Variables in Queries

2017-10-19 Thread Pavel Stehule
Hi 2017-10-19 17:21 GMT+02:00 Igal @ Lucee.org : > Hello, > > In other database servers, which I'm finally dropping in favor of > Postgres, I can do the following (mind you that this is for illustration > only, I do not actually write queries like that): > > DECLARE @query

Re: [GENERAL] Using Variables in Queries

2017-10-19 Thread Alban Hertroys
On 19 October 2017 at 17:25, Scott Mead wrote: > > > On Thu, Oct 19, 2017 at 11:21 AM, Igal @ Lucee.org wrote: >> >> Hello, >> >> In other database servers, which I'm finally dropping in favor of >> Postgres, I can do the following (mind you that this is for

Re: [GENERAL] Using Variables in Queries

2017-10-19 Thread Scott Mead
On Thu, Oct 19, 2017 at 11:21 AM, Igal @ Lucee.org wrote: > Hello, > > In other database servers, which I'm finally dropping in favor of > Postgres, I can do the following (mind you that this is for illustration > only, I do not actually write queries like that): > > DECLARE

[GENERAL] Using Variables in Queries

2017-10-19 Thread Igal @ Lucee.org
Hello, In other database servers, which I'm finally dropping in favor of Postgres, I can do the following (mind you that this is for illustration only, I do not actually write queries like that): DECLARE @query varchar(64) = 'red widget'; SELECT * FROM products WHERE col1 LIKE @query    OR

Re: [GENERAL] Table partionning : INSERT with inconsistent return ligne inserted.

2017-10-19 Thread STERBECQ Didier
Hi Vik, Thanks for that, it is working. Didier. -Message d'origine- De : Vik Fearing [mailto:vik.fear...@2ndquadrant.com] Envoyé : mercredi 18 octobre 2017 19:30 À : STERBECQ Didier; pgsql-general@postgresql.org Objet : Re: [GENERAL] Table partionning : INSERT with inconsistent return

Re: [GENERAL] Problems with the time in data type timestamp without time zone

2017-10-19 Thread américo bravo astroña
We are using two different programs within the same computer, a program saves the data with date and time in the DB and we are doing another program to retrieve that information with date and time to generate reports, all this within the same computer. Best regards. 2017-10-18 11:33 GMT-04:00

Re: [GENERAL] pgpass file type restrictions

2017-10-19 Thread Tom Lane
"Daniel Verite" writes: > Desidero wrote: >> When attempting to use something like an anonymous pipe for a >> passfile, psql throws an error stating that it only accepts plain files > So the script doing that has access to the password(s) in clear text. > Can't it

Re: [GENERAL] pgpass file type restrictions

2017-10-19 Thread Daniel Verite
Desidero wrote: > When attempting to use something like an anonymous pipe for a > passfile, psql throws an error stating that it only accepts plain files So the script doing that has access to the password(s) in clear text. Can't it instead push the password into the PGPASSWORD

Re: [GENERAL] pgpass file type restrictions

2017-10-19 Thread Andrew Dunstan
On 10/19/2017 09:20 AM, Desidero wrote: > I agree that it would be better for us to use something other than > LDAP, but unfortunately it's difficult to convince the powers that be > that we can/should use something else that they are not yet prepared > to properly manage/audit. We are working

Re: [GENERAL] pgpass file type restrictions

2017-10-19 Thread Desidero
I agree that it would be better for us to use something other than LDAP, but unfortunately it's difficult to convince the powers that be that we can/should use something else that they are not yet prepared to properly manage/audit. We are working towards it, but we're not there yet. It's not

Re: [GENERAL] pgpass file type restrictions

2017-10-19 Thread Andrew Dunstan
On 10/19/2017 02:12 AM, Tom Lane wrote: > Desidero writes: >> I’m running into problems with the restriction on pgpass file types. When >> attempting to use something like an anonymous pipe for a passfile, psql >> throws an error stating that it only accepts plain files. >>

Re: [GENERAL] Problems with the time in data type timestamp without time zone

2017-10-19 Thread Achilleas Mantzios
On 18/10/2017 18:02, Root2 wrote: Hi, I have a program that saves information in a DB Postgresql need to extract data from date and time of that DB but when I retrieve the date and time information is always ahead 3 hours, the type of data that has that field is timestamp without time zone,

Re: [GENERAL] Log storage

2017-10-19 Thread Condor
On 18-10-2017 09:18, Ivan Sagalaev wrote: Hello everyone, An inaugural poster here, sorry if I misidentified a list for my question. I am planning to use PostgreSQL as a storage for application logs (lines of text) with the following properties: - Ingest logs at high rate: 3K lines per

Re: [GENERAL] Divert triggers on materialized views

2017-10-19 Thread Brent Wood
Hi Ewen, My advice would be to use table partitions... split your history table up into (maybe annual)? partitions, have these inherited into a parent table, which becomes your new "history table" (perhaps instead of a view?) If times are a common component of a where clause, given the

[GENERAL] Problems with the time in data type timestamp without time zone

2017-10-19 Thread Root2
Hi, I have a program that saves information in a DB Postgresql need to extract data from date and time of that DB but when I retrieve the date and time information is always ahead 3 hours, the type of data that has that field is timestamp without time zone, I appreciate your time and attention.

[GENERAL] COPY log row count feauture request

2017-10-19 Thread david . turon
Hi everyone, i have question if is possible log count row of COPY command to csv/syslog. I know that there are some limitations like triggers BEFORE INSERT. Don't know if any others were pleased with this feature. Have a nice day. David -- - Ing. David

Re: [GENERAL] pgpass file type restrictions

2017-10-19 Thread Tom Lane
Desidero writes: > I’m running into problems with the restriction on pgpass file types. When > attempting to use something like an anonymous pipe for a passfile, psql > throws an error stating that it only accepts plain files. > ... > Does anyone know why it’s set up to avoid