Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
steve-chavez
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
17 ms
·
151.
▲
by
steve-chavez
7y ago
You could use PostgreSQL Foreign data wrappers[1] and leverage PostgREST for a SQL Server schema. tds_fdw[2] works pretty well for this(I've used it in a project related to open data). Basically, you'd have to map mssql tables to
152.
▲
by
steve-chavez
7y ago
Hey Derek. For tests, have you tried pgTAP[1]? Having all the db tests in SQL is very convenient and I think pgTAP could simplify your API tests. Here are some examples of how testing with pgTAP looks like: https://github.com
153.
▲
by
steve-chavez
7y ago
I remember using FreeDOS for learning assembly through the `debug` command. Looking at the BIOS data was fun for me at the time. I've also tried DOSBox but since it's emulated the BIOS data wasn't "real". I have not
154.
▲
by
steve-chavez
7y ago
You can handle versioning with PostgreSQL schemas. You can have v1, v2, etc. These usually contain views and stored procedures.
155.
▲
by
steve-chavez
7y ago
> Since the database schema is a compromise of all the various applications, that schema will not conform to the object model of any particular application. Here it jumps to objects instead of database VIEWs, that can be tailored for eac
156.
▲
by
steve-chavez
7y ago
Nice! I think you could have used pg COPY .. CSV[0] plus a CREATE TABLE .. AS to avoid the custom python script and do the importing with only SQL. Also, as others have mentioned you can generate the st_asmvt format directly from pg. This p
157.
▲
by
steve-chavez
8y ago
Also, for even more protection against expensive queries we recommend using this extension: https://github.com/pgexperts/pg_plan_filter You can filter queries by their plan cost before they are executed.
158.
▲
by
steve-chavez
8y ago
PostgREST doesn't expose PostgreSQL full SQL capabilities. The clients can't do at will JOINs, DISTINCT, GROUP BYs, CALL arbitrary functions, etc, through its REST interface. It only exposes fast/safe operations and a single
159.
▲
by
steve-chavez
8y ago
Just FYI, there's a pending enhancement in PostgREST[1] that would allow us to take advantage of HTTP/2 multiplexing and have multiple requests executed atomically in a single transaction. [1]: https://github.com/Po
160.
▲
by
steve-chavez
8y ago
Thanks a lot for your feedback @hardwaresofton, I've just added a section in our README that includes a Paypal link for one-time donations. https://github.com/PostgREST/postgrest#supporting-developmen... Thank you
161.
▲
by
steve-chavez
8y ago
I've long thought about creating a standard(iana type) for PostgREST json schema + http querystring conventions. I've seen some APIs[1](only one I can remember now) that follow PostgREST conventions, so perhaps this could benefit
162.
▲
by
steve-chavez
8y ago
You could get a more complete solution with PostgreSQL + PostgREST. Regarding the concerns: > Security: we don’t want people messing up our data Row level security + roles/grants should be enough to cover this one. > On performan
163.
▲
by
steve-chavez
8y ago
> you need to be a super user to switch roles like that No need for superuser, only membership to the role that it's going to switch is required. i.e. a `GRANT web_user TO connector`. Besides that, only privilege the connector role
164.
▲
by
steve-chavez
8y ago
Hey haolez, glad to hear you like PostgREST :)(I'm the current maintainer). If you manage to open source your project please stop by our docs repo, would be great to have a real world PostGIS project in our ecosystem list.
165.
▲
by
steve-chavez
8y ago
Cool feature indeed, though keep in mind that for it to work you need to have the "virtual field" in the `search_path` of the session user. In PostgREST, we take advantage of this behavior to generate queries without the need for
166.
▲
by
steve-chavez
8y ago
You can treat SQL code as any other code and version your schema with git. Migrations can be handled with https://sqitch.org , and you can also reduce some of the work with https://www.apgdiff.com that will generate C
167.
▲
by
steve-chavez
8y ago
The database is more than just tables, for your particular example you could use a computed column https://postgrest.org/en/v5.0/api.html#computed-columns . In general, custom business logic can be done through sto
168.
▲
by
steve-chavez
8y ago
The DB can do much more than simple queries, you can use stored procedures for any custom business logic, you can even use PL/Python in them. See https://postgrest.org/en/v5.0/api.html#stored-procedures for m
169.
▲
by
steve-chavez
8y ago
If you're using PostgreSQL, I invite you to try PostgREST https://postgrest.org/en/v5.0/intro.html which takes the database-first approach even further, with PostgREST you develop all your business logic in S
170.
▲
by
steve-chavez
9y ago
Haskell has also an ongoing implementation of linear types https://github.com/ghc-proposals/ghc-proposals/pull/111 . Anyone know what are the major differences between these two implementations? Will linear ty
171.
▲
by
steve-chavez
9y ago
Not to discredit Django but if you're already using PostgreSQL you could use http://postgrest.com which is a more tightly knit component for fts. With PostgREST you can avoid the abstractions overhead and just use plain SQL
172.
▲
by
steve-chavez
9y ago
Why didn't you just use stock PostgREST, in which area did you found it lacking?(Curious)
173.
▲
by
steve-chavez
9y ago
This tool enables a decoupled architecture. A simple example is sending emails when a user signs up. Instead of having explicit code in your signup function that does the work (and slows down your response), you just have to worry about ins
174.
▲
Show HN: pg-amqp-bridge – Send Messages from PostgreSQL to RabbitMQ (rust)
(github.com)
4 points
by
steve-chavez
9y ago
|
2 comments