Re: easy way to acquire height / width from images (PNG, JPEG) stored as bytea?

2020-04-17 Thread Steve Atkins
On 17/04/2020 13:37, Achilleas Mantzios wrote: Hello Dear List, we have a table holding email attachments as bytea, and we would like to filter out images of small dimensions, which are not of any value to our logic. I took a look at pg_image extension, tested it, and it proved

Re: Using unlogged tables for web sessions

2020-04-17 Thread Steve Atkins
On 16/04/2020 19:39, Stephen Carboni wrote: Hello. I was wondering if anyone was using unlogged tables for website sessions in production. I'm interested if it breaks the prevailing opinion that you don't put sessions in PG. I generally put sessions in postgresql, with regular tables, when

Re: Rules versus triggers

2020-03-07 Thread Steve Atkins
On 07/03/2020 11:56, stan wrote: Could someone give me a brief description of the intended functionally, and how the 2 features work of rules, versus triggers? It appears to me that they are simply 2 different ways to set up triggers, but I am certain that is just because of my lack of

Re: Fwd: sensible configuration of max_connections

2020-02-07 Thread Steve Atkins
On 07/02/2020 13:18, Chris Withers wrote: On 07/02/2020 12:49, Chris Ellis wrote: What's "too much" for max_connections? What happens when you set it to high? What factors affect that number? When sizing max_connections you need to trade off how many connections your application will

Re: slow insert speeds with bytea

2019-12-02 Thread Steve Atkins
On 01/12/2019 17:59, Alex O'Ree wrote: Is there anything I can to increase insert speeds for bytea? Currently running postgres 9.6.15 I have a few tables without a bytea and a few with bytea. There is a large performance difference with inserts between the two. I'm inserting a byte[]

Re: Remote Connection Help

2019-11-21 Thread Steve Atkins
On 21/11/2019 14:30, Ekaterina Amez wrote: El 21/11/19 a las 15:21, Jason L. Amerson escribió: I am at a loss for what to do. I have read article after article about how to allow remote connections on my PostgreSQL server and none of what the articles say do, worked for me. I have edited

Re: jsonb_set() strictness considered harmful to data

2019-10-21 Thread Steve Atkins
On 21/10/2019 17:39, Steven Pousty wrote:  Turning a JSON null into a SQL null  and thereby "deleting" the data is not the path of least surprises. In what situation does that happen? (If it's already been mentioned I missed it, long thread, sorry). Cheers,   Steve

Re: jsonb_set() strictness considered harmful to data

2019-10-20 Thread Steve Atkins
On 19/10/2019 07:52, Ariadne Conill wrote: I would say that any thing like update whatever set column=jsonb_set(column, '{foo}', NULL) should throw an exception. It should do, literally, *anything* else but blank that column. steve=# create table foo (bar jsonb not null); CREATE TABLE

Re: PostgreSQL License

2019-09-19 Thread Steve Atkins
On 19/09/2019 13:48, Steve Litt wrote: My understanding is the PostgreSQL license is more like the MIT license, which actually allows one to modify the code and claim it as proprietary. You could do that, yes. :) https://wiki.postgresql.org/wiki/PostgreSQL_derived_databases Cheers,   Steve

Re: Work hours?

2019-08-28 Thread Steve Atkins
> On Aug 27, 2019, at 11:27 PM, stan wrote: > > I am just starting to explore the power of PostgreSQL's time and date > functionality. I must say they seem very powerful. > > I need to write a function that, given a month, and a year as input returns > the "work hours" in that month. In

Re: Importing from CSV, auto creating table?

2019-08-23 Thread Steve Atkins
On 21/08/2019 22:15, stan wrote: I have a situation where we need to import data, as an interim measure, from spreadsheets. I have read up on \copy and COPY, but I do not see that either of these can use the header from a CSV file to define a new table. Am I missing something? Also downloaded

Re: DRY up GUI wiki pages

2019-07-10 Thread Steve Atkins
> On Jul 10, 2019, at 7:38 PM, Bruce Momjian wrote: > > On Wed, Jul 10, 2019 at 09:08:30AM -0600, Roger Pack wrote: >> I learned today there are "two" wiki pages for GUI clients: >> >> https://wiki.postgresql.org/wiki/PostgreSQL_Clients >> >>

Re: Research on ?? operators

2019-06-04 Thread Steve Atkins
> On Jun 4, 2019, at 1:35 PM, Michael Lewis wrote: > > ":foo" named placeholders > > If I may, is this supported natively in Postgres prepared statements? It's not. The only type we support are numbered $1 type placeholders. > Can I see an example? I do not care much for the numbers of

Re: Research on ?? operators

2019-06-04 Thread Steve Atkins
> On Jun 4, 2019, at 10:00 AM, Matteo Beccati wrote: > > Hello generals, > > I'm trying to resurrect a change to the PHP PDO driver to allow using > the "?" json operator (and other operators containing a question mark), > without it being interpreted as a placeholder for a query argument.

Re: schema change tracking

2019-05-16 Thread Steve Atkins
> On May 16, 2019, at 5:41 PM, Benedict Holland > wrote: > > Hi All, > > I am fairly this question has many answers but here it goes: > > I need a tool that can track schema changes in a postgesql database, write > scripts to alter the tables, and store those changes in git. Are there

Re: SQL queries not matching on certain fields

2019-04-03 Thread Steve Atkins
> On Apr 3, 2019, at 2:06 PM, Felix Ableitner wrote: > > Hello, > > I'm having a very strange problem with the Postgres database for my website. > Some SQL queries are not matching on certain fields. I am running these > commands via the psql command. > > Here is a query that works as

Re: Case Insensitive

2019-03-28 Thread Steve Atkins
> On Mar 28, 2019, at 9:08 AM, Ron wrote: > > On 3/28/19 3:33 AM, Steve Atkins wrote: >> >>> On Mar 28, 2019, at 8:29 AM, Ron wrote: >>> >>> On 3/28/19 3:23 AM, Sameer Kumar wrote: >>> [snip] >>>> You can write a query with

Re: Case Insensitive

2019-03-28 Thread Steve Atkins
> On Mar 28, 2019, at 8:29 AM, Ron wrote: > > On 3/28/19 3:23 AM, Sameer Kumar wrote: > [snip] >> You can write a query with upper function: >> >> select * from emp where upper(ename)=upper('aaa'); > > That's a guaranteed table scan. Unless you have an index on upper(ename). Cheers,

Re: Forks of pgadmin3?

2019-03-22 Thread Steve Atkins
> On Mar 22, 2019, at 10:56 AM, Christian Henz > wrote: > > I know I'm late to the party, but we're only now migrating from > Postgres 9.x, realizing that pgadmin3 does not support Postgres 11. > > I have checked out pgadmin4, but I don't like it at all. My colleagues > feel the same way,

Re: Replication

2019-02-26 Thread Steve Atkins
> On Feb 26, 2019, at 9:41 AM, Sonam Sharma wrote: > > Hi, > > Can we do master to master replication in Postgres. Look at https://bucardo.org/Bucardo/ , BDR (e.g. https://www.2ndquadrant.com/en/resources/postgres-bdr-2ndquadrant/ ), RubyRep or any of the other multimaster solutions at

Re: the installation of pgadmin4 makes me weep in frustration

2019-01-14 Thread Steve Atkins
> On Jan 14, 2019, at 7:58 AM, robert wrote: > > Hi There > > > > first, thanks a lot for the great an beautiful software we get from > PostgreSQL and all people around it. > > But I wonder how it comes, that installing pgadmin4 is so incredibly hard? > > And no documentation. > > I

Re: incomplete startup packet messages in logs

2018-11-01 Thread Steve Atkins
> On Nov 1, 2018, at 1:27 PM, Vijaykumar Jain wrote: > > Hi Team, > > I know this is has been answered a lot on the internet wrt ignoring, > but i am unable to figure out why I get these messages in logs > "incomplete startup packet" Check which of your monitoring systems is configured to

Re: Pg_logical without subscription. Can we log the operations ?

2018-10-10 Thread Steve Atkins
> On Oct 9, 2018, at 11:45 PM, Dilshan wrote: > > Hi Team, > I am working on a requirement, where I need to log each and every operation > on the master db. So I was thinking if I could do with pg_logical by setting > my master db as publisher and setting a new db as subscriber and dropping

Re: Code of Conduct plan

2018-09-17 Thread Steve Atkins
> On Sep 17, 2018, at 4:57 PM, Steve Litt wrote: > > On Mon, 17 Sep 2018 08:27:48 -0700 > "Joshua D. Drake" wrote: > >> >> At this point it is important to accept that the CoC is happening. We >> aren't going to stop that. The goal now is to insure a CoC that is >> equitable for all

Re: Question on postgresql.conf

2018-07-31 Thread Steve Atkins
> On Jul 31, 2018, at 10:59 AM, Dimitri Maziuk wrote: > > On 07/31/2018 12:33 PM, George Neuner wrote: > >> Is there some reason that postgresql.conf cannot be a link to your >> file? > > It's six of one, half a dozen of the other. The big problem is when the > network share is unavailable

Re: Load data from a csv file without using COPY

2018-06-19 Thread Steve Atkins
> On Jun 19, 2018, at 10:14 PM, Ravi Krishna wrote: > >> >> If performance is relevant then your app should probably be using COPY >> protocol, not line by line inserts. It's >> supported by most postgresql access libraries. If your app does that then >> using "\copy" from psql would be >>

Re: Load data from a csv file without using COPY

2018-06-19 Thread Steve Atkins
> On Jun 19, 2018, at 9:16 PM, Ravi Krishna wrote: > > In order to test a real life scenario (and use it for benchmarking) I want to > load large number of data from csv files. > The requirement is that the load should happen like an application writing to > the database ( that is, no COPY

Re: Performance problem postgresql 9.5

2018-06-08 Thread Steve Atkins
> On Jun 8, 2018, at 1:09 PM, Alvaro Herrera wrote: > > On 2018-Jun-08, Miguel Angel Sanchez Sandoval wrote: > >> Hi guys, migrate from 8.4 to 9.5, all OK except that 2-3 days pass and the >> database experiences slowness, I execute the linux top command and it shows >> me a postgres user

Re: Query hitting empty tables taking 48 minutes

2018-06-07 Thread Steve Atkins
> On Jun 7, 2018, at 12:11 PM, Rob Sargent wrote: > > What's the url doing in "blob_id = ds3.blob.id

Re: Code of Conduct plan

2018-06-05 Thread Steve Atkins
> On Jun 5, 2018, at 9:51 AM, James Keener wrote: > > > [T]he > main goal is to ensure that if someone is being harassed by a community > member, they have an appropriate avenue to safely report it and ensure > the CoC committee will review > > To be honest, this is a bigger problem. Why

Re: Code of Conduct plan

2018-06-04 Thread Steve Atkins
> On Jun 4, 2018, at 3:30 PM, Joshua D. Drake wrote: > > On 06/04/2018 01:46 PM, Tom Lane wrote: >> "Joshua D. Drake" writes: >>> On 06/03/2018 11:29 AM, Tom Lane wrote: We are now asking for a final round of community comments. >> Actually, it's intentional that we are not saying that.

Re: posgresql.log

2018-05-21 Thread Steve Atkins
> On May 21, 2018, at 3:21 PM, Steve Crawford > wrote: > > > > If this is a test server and you can take it offline for forensics I would do > so, especially if it could provide a path to other internal or critical > resources. If you can image it for

Re: how to securely delete the storage freed when a table is dropped?

2018-04-13 Thread Steve Atkins
> On Apr 13, 2018, at 10:48 AM, Jonathan Morgan > wrote: > > For a system with information stored in a PostgreSQL 9.5 database, in which > data stored in a table that is deleted must be securely deleted (like shred > does to files), and where the system is

Re: best way to write large data-streams quickly?

2018-04-09 Thread Steve Atkins
> On Apr 9, 2018, at 8:49 AM, Mark Moellering > wrote: > > Everyone, > > We are trying to architect a new system, which will have to take several > large datastreams (total of ~200,000 parsed files per second) and place them > in a database. I am trying to

Re: Prepared statements

2018-03-21 Thread Steve Atkins
> On Mar 21, 2018, at 2:09 PM, Tim Cross wrote: > > > a simple question I wasn't able to get a clear answer on > > It is general best practice to use prepared statements and parameters > rather than concatenated strings to build sql statements as mitigation >

Re: Best options for new PG instance

2018-03-05 Thread Steve Atkins
> On Mar 5, 2018, at 8:53 AM, David Gauthier wrote: > > Hi: > > I'm going to be requesting a PG DB instance (v9.6.7) from an IT dept in a > large corp setting. I was wondering if anyone could comment on the pros/cons > of getting this put on a virtual machine vs

Re: Is there a continuous backup for pg ?

2018-03-02 Thread Steve Atkins
> On Mar 2, 2018, at 11:05 AM, Gary M wrote: > > Hi, > > I have an unusual requirement for schema based, live backup of a 24/7 > database processing 100K inserts/updates per hour. The data store is around > 100TB. > > The requirement is supporting an incremental backup of

Re: Enforce primary key on every table during dev?

2018-03-01 Thread Steve Atkins
(Melvin's mail doesn't quote properly; I've tried to fix it but may have broken something) > On Mar 1, 2018, at 8:50 AM, Melvin Davidson wrote: > > > On Thu, Mar 1, 2018 at 11:43 AM, Alban Hertroys wrote: > > >> On 1 March 2018 at 17:22, Steven

Re: persistent read cache

2018-02-12 Thread Steve Atkins
> On Feb 11, 2018, at 5:14 PM, Sand Stone wrote: > > > Hi. I wonder if there is such a thing or extension in the PG world. > > Here is my use case. I am using PG (PG10 to be more specific) in a > cloud VM environment. The tables are stored in RAID0 managed SSD > backed

Re: Notify client when a table was full

2018-01-22 Thread Steve Atkins
> On Jan 21, 2018, at 6:44 PM, Vincenzo Romano > wrote: > > 2018-01-21 19:31 GMT+01:00 Francisco Olarte : >> On Sun, Jan 21, 2018 at 1:27 PM, Michael Paquier >> wrote: >>> On Fri, Jan 19, 2018 at 03:40:01PM +,

Re: Connection type

2018-01-18 Thread Steve Atkins
> On Jan 18, 2018, at 4:06 PM, Enrico Pirozzi wrote: > > Hi, > > is there a way to know what kind of connection a client is doing? > (ODBC,JDBC..etc) > > I saw the pg_stat_activity view, > > > but in the application name field there no infomation about > what kind

Re: Mailing list archiver

2018-01-03 Thread Steve Atkins
> On Jan 3, 2018, at 6:00 AM, Jordan Deitch wrote: > > Thanks for the feedback! I will continue to address these issues, and I > intend on adding #postgresql IRC logs as well :-) Please don't make a public archive of #postgresql without discussion. I believe the general

Re: Does PostgreSQL check database integrity at startup?

2017-12-29 Thread Steve Atkins
> On Dec 29, 2017, at 6:14 PM, Melvin Davidson wrote: > > Edson's original request was for a query that shows the FILENAMEs for the > table. Which the query you provide does not do. > As for "qood" query, that is entirely an opinion. But a well informed one. Your

Re: postgresql-10 for ubuntu-17.10 (artful)?

2017-12-27 Thread Steve Atkins
> On Dec 26, 2017, at 6:21 PM, Stuart McGraw wrote: > > Is there a repository for Postgresql-10 available at > http://apt.postgresql.org/pub/repos/apt > for Ubuntu-17.10 (artful)? When I look at the dist/ > subdirectory there, there seem to be repos for all the > other

Re: To all who wish to unsubscribe

2017-11-21 Thread Steve Atkins
> On Nov 21, 2017, at 10:39 AM, Andrew Sullivan <a...@crankycanuck.ca> wrote: > > On Mon, Nov 20, 2017 at 02:46:08PM -0800, Steve Atkins wrote: >> That's poor practice, for several reasons - replay attacks with added content >> and it being an extremely rare practi

Re: To all who wish to unsubscribe

2017-11-20 Thread Steve Atkins
> On Nov 20, 2017, at 2:18 PM, Piotr Stefaniak > wrote: > > On 2017-11-20 21:03, Tom Lane wrote: >> "Joshua D. Drake" writes: >>> On 11/20/2017 11:40 AM, Magnus Hagander wrote: >>> One thing I would note is that there is no longer a footer