inbox do something tomorrow that i just remembered about but don't want to leave the command line
instructions in the readme
. they're easy.
inbox do something tomorrow that i just remembered about but don't want to leave the command line
instructions in the readme
. they're easy.
I was trying to open some index.html
file that attempts to load in a json
file and got the following error:
Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.
Turns out this error gets thrown in chrome if your web page isn't being served up via a proper webserver credits here
-- show all schema information | |
select * from information_schema.schemata; | |
-- find which schema a table is in | |
select | |
table_schema | |
from | |
information_schema.tables | |
where |
-- find rows where a certain key exists | |
select | |
* | |
from | |
my_table | |
where | |
json_field::jsonb ? 'key_i_want' | |
; | |
-- get certain key from json field |
-- view interesting information for all queries for a user | |
select | |
pid, | |
client_addr, | |
application_name, | |
(current_timestamp - query_start) as duration, | |
state, | |
query | |
from | |
pg_stat_activity |
testing in browser - woo fun, but let's make an api endpoint
find any rows where multiple id
s exist:
select
*
from
my_table
where
id in (
select
"an intellect that is much smarter than the best human brains in practically every field, including scientific creativity, general wisdom and social skills."