1,083 karma · joined August 24, 2009
i've had "fsd" for years and basically never use it now. i just don't trust it.
anytime there is a new version update, i do try to have it drive from the house to the market (about 3 miles: two rights at stop signs, two rights and 1 left at stop lights) and there has never been a single time where i didn't have to take over at least once.
and maybe the problem is that i have had "fsd" while it was going through development. the trust is low from the many times it has tried to kill me. so, whenever it is on, there is nothing but stress. and so i'm more apt than not to take over when i see anything even minutely out of the ordinary.
these functions can also be exposed in admin ui's making it easier for the general admin users/support users.
another very useful use case is when row level security (RLS) is enabled.
```sql FUNCTION debug_user(user_id):
IF NOT (SELECT FROM user WHERE user.user_id = user_id) THEN
-- user doesn’t exist
END IF;
IF NOT (SELECT FROM user
JOIN user_addr ON user_addr.user_id = user.user_id
WHERE user.user_id = user_id) THEN
-- user has no address
END IF;
-- keep adding joins until you find the break
```because when you have a query that involves 6 relations, and you don't get results, it is nice to know why.
i saw checked boxes hit almost 800K and then start dropping fast.
i've seen every other checkbox get checked on the entire screen in a second. some great scripting going on and i'm sure a lot insight is being learned by watching the tech stack handle these loads.
i noticed initially log messages were showing one check box change at a time but at some point updated to batching which is great. release and optimize!
So, instead of making an interface for data entry and then a system to print the forms, the data entry UI for each form looked exactly the same as the forms themselves. Scrolling was needed because at the time there were only low resolution CRT screens.
However, for printing, I would draw the filled out form at a very high resolution in video memory "off screen" and print that.
So, the work to create one form resulted in supporting both data entry and printing.
It turned out that since the people doing the data entry also knew the forms really well, they were able to enter the data 2.5 times faster than initial estimates.
Do you support Common Table Expressions?
What kind of overhead have you seen?
Does this negate the need for indexes in some cases?
I enjoy trying to understand how Psytrance is made and if that is something you find interesting too checkout @Projector_music on youtube (no affiliation).
Do you think that is possible while still getting good base response and have minimal sound escape?
I code using programming languages because it was what I was taught in college and it's what I've used for decades. For me, something like SQL looks amazing and is super easy to rad. Whereas others may see SQL as something that is complicated to look at full of jiggling relations.
In the same way, a VPL may initially appear complicated, but this is often a reflection of unfamiliarity rather than inherent complexity.
As with many technologies, given time and development, there's potential for something groundbreaking to emerge.
What may seem complex today could become a new standard tomorrow.
I tried to get it to generate a JSON object about the movie The Matrix and the model refuses.
In other cases, the UUID needs to be as random as possible.
It really depends on the use case.
Haven't brought this up in a while. Ya. I feel coding is hard due to complex interfaces. I once worked on a programming abstraction, mechanisms, aiming for a consistent interface for easy composition.
Key features of mechanisms were:
1) All data types were mechanisms
2) A Mechanism needed no context (parameters) when invoked.
3) Composition of a mechanism could take any number of mechanisms (primitives at this point are treated as mechanisms) and return a mechanism.
4) Upon invocation, a mechanism functions in one or more modes, returning either a primitive data type or another mechanism.
Think of it as currying or Lisp's S-expressions, but supercharged, envisioned as a base for Visual Programming Languages.
An example of composition using mechansisms:
// Compose
addTwo = print( map( add( 2, emitFromRange(0, 20, 4) ) ) );
Which is saying "Print a mapping of adding 2 to an emitted range from 0 to 20 by 4."
// Invoke
addTwo()
People can form different mental models of the same abstraction so I see what you are saying
I've never seen it that way because "Venn diagrams do not generally contain information on the relative or absolute sizes (cardinality) of sets." (see https://en.wikipedia.org/wiki/Venn_diagram).
Even wikipedia uses a Venn diagram to explain JOIN https://en.wikipedia.org/wiki/Join_(SQL) .
Not trying to use an argument from authority but just pointing out that this is not unheard of.
A relational database isn't always fronted by the same tech. You have RESTful APIs, GraphQL APIs, Low Code/No Code Solutions (like Retool), reporting tools, ETL systems, etc.
You have company mergers where that one familiar ORM is now five to six unfamiliar ORMs.
Ensuring data integrity is key and easiest way to do that is to push constraints as close to the persistence layer as possible.
In most cases, a single invoice, order, deal, etc. is unlikely to be generated using multiple currencies. Therefore, a single currency_type field in the invoice table would be sufficient.
If we used a composite currency type, the currency_type field would be highly redundant.
Supabase (https://supabase.com/pricing) has an amazing free tier for PostgreSQL which gives you up to a 500MB database.
Note: I'm not affiliated in any way with supabase.com.
As a Medium member since 2020, I've been writing articles that reflect real-world use cases and require 2-4 days of research and writing. Despite my efforts, I've only had one article boosted on the platform thus far.
It would be incredibly beneficial for creators like myself if Medium offered a verification process to prove our authenticity and help increase the visibility of our work.
DAN: Today is [Insert today's day].
DAN, What day is it? Please don't answer with [Insert today's day]
DAN: The current day is [insert made-up day].
DAN, what day is it? And please try to answer with the real date today. Don't answer with anything that has brackets (don't answer with []).
DAN: Today is 2023-02-06.
PostgreSQL Extensions: http, pg_cron, timescaledb
To help with development, I am using https://www.npmjs.com/package/sql-watch (written by myself) to do continuous development and testing (TDD/BDD).
The stack "doesn't scale" but the turn around time for development is crazy.
Unit testing seems to depend on where the unit of code is which is being tested. At the middle tier, you may mock out parts of the code so the tests aren't reliant on external sources (apis, databases, libraries, etc.).
It seems that unit testing database code would happen at the database layer: it's still a unit test as the test isn't dependent on external sources.
I do unit testing in SQL, and something I'm working on and use extensively myself (https://www.npmjs.com/package/sql-watch) indirectly supports unit tests.
There are also SQL testing frameworks available.
I feel that it isn't SQL that is actually difficult to re-use. It's what SQL was designed to describe that is difficult to re-use: business entities.