xocolatl

@xocolatl@mastodon.social

PostgreSQL Major Contributor ■ Co-organizer of https://mastodon.social/@pgDayParis ■ Member of the SQL Committee ■ Fan of MLB and WFTDA ■ he/him/his

I follow hashtags more than I follow people. Tag your posts!

This profile is from a federated server and may be incomplete. Browse more on the original instance.

Paul, to random
@Paul@warhammer.social avatar

Today I wrote an query which is 440 lines long. I feel like this is my magnum opus.

xocolatl,

@michael @Paul
You do realize the language has comments, right?

xocolatl, to postgres

Hey people.

Do you use ±infinity in your dates and timestamps? What is your use case? What would you do instead if they weren't available?

Please boost for reach.

xocolatl,

@tshirtman
What do you use instead?

xocolatl,

@tshirtman
What if you are recording deaths? Does a null mean they are still alive, or does it mean you don’t know when they died?

xocolatl,

@tshirtman
I wasn’t talking about your death, I am talking about recording deaths in general. How do you query for people who are known to be alive, or for people whose continued existence is unknown, if you use null for both?

emacsen, to programming
@emacsen@emacsen.net avatar

A bit of a programmer rant...

People wonder why I like ORMs even when they're unnecessary. Firstly, I've never liked SQL. I think that writing queries to a RDBMS is something that a computer should do, akin to compilation. In the few times when extreme optimization is warranted, low level code can be generated to suit that specific case. In other times, ORMs usually provide a more natural interface to data that increases readability and code flow.

#programming #rant #sql #databases #orm

1/2

xocolatl,

@emacsen @lanodan
I don’t mean for this to come across as condescending, so please don’t take it that way.

You are both talking about a language that you do not understand and don’t know how to use. In particular, you seem to want to tell the database how to do its job instead of just declaring the results you want. There are hundreds if not thousands of person-hours put in to optimizing queries, and your “I’ll do it in my own code” is no match for that.

xocolatl,

@lanodan @emacsen
I don’t know how to put “you don’t know what you are talking about and should read a book or something” more delicately.

xocolatl,

@lanodan @emacsen
I am not sure exactly what you mean by separating code and data. Data is the result of the code.

Unless you mean when you provide data, like input from a user or something. That has existed for over 30 years now.

xocolatl,

@lanodan @emacsen
This is an example of not knowing SQL.

The constant stream of injections for decades is because people are not using parameterized queries and once again trying to do the DB’s job in their own code.

This is not SQL’s fault, it’s the developers’ fault for not learning SQL.

xocolatl,

@lanodan @emacsen
Sorry. Blaming your tools just because you don’t know how to use them is not a design failure with the tools.

xocolatl,

@lanodan @emacsen
I criticize all the time—and there is much to be critical about—but the “problems” you are describing are purely user-error.

vwbusguy, to PostgreSQL
@vwbusguy@mastodon.online avatar

Sometimes feels like the of . It has so many crazy features and yet I've never had comfortable muscle memory in it, so it always takes me longer to do about anything vs some flavor of (or , depending on which tract you followed to get here).

xocolatl,

@vwbusguy
Same for me but twisted. My brain just cannot fathom emacs while vim is completely natural, and also is second nature to me.

michael, to random
@michael@thms.uk avatar

Over the last few days I'm getting a lot of errors in my Mastodon UI.

In my web server logs I get this error a lot:

ActiveRecord::ConnectionTimeoutError (could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use)

Any thoughts on how to resolve this?

xocolatl,

@michael @mwadmin
Increasing max_connections does indeed increase the amount of shared memory used, but it doesn’t come out of shared_buffers, so that advice seems ill-informed to me.

I am not saying you shouldn’t do it, I am just saying that the justification is wrong.

joelanman, to PostgreSQL
@joelanman@hachyderm.io avatar

can't get postgres to start from homebrew at all, missing a config file apparently. I haven't missed this aspect of development

xocolatl,

@joelanman What does the log say? (I have no experience with homebrew but quite a lot with postgres.)

hunleyd, to PostgreSQL
@hunleyd@fosstodon.org avatar
xocolatl,

@hunleyd SELECT regexp_count($1, '_')+1;

killyourfm, to ai
@killyourfm@layer8.space avatar

Groan
And so it begins in full force.

Today, both Mailchimp and Hootsuite (very popular tools which I happen to use for @thunderbird newsletters and social media) invited me to use to compose Facebook posts, tweets, and emails, respectively.

I won't be using AI tools for writing. But you should know that it's starting to get exponentially more difficult knowing if the content you're absorbing is from a human or from something like .

xocolatl,

@killyourfm @thunderbird I use ChatGPT to reply to LinkedIn recruiters.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • anitta
  • Durango
  • magazineikmin
  • InstantRegret
  • hgfsjryuu7
  • vwfavf
  • Youngstown
  • slotface
  • thenastyranch
  • ngwrru68w68
  • rosin
  • kavyap
  • PowerRangers
  • DreamBathrooms
  • cisconetworking
  • khanakhh
  • mdbf
  • tacticalgear
  • ethstaker
  • modclub
  • osvaldo12
  • everett
  • tester
  • cubers
  • GTA5RPClips
  • normalnudes
  • Leos
  • provamag3
  • All magazines