I created new role named "support" in my PostgreSQL. Now I need grant "READ ONLY" permissions for this role an ALL exists databases/tables.  Also I need automatically granted same permissions on each DB that will created in future.  I unsuccessfully tried next queries for grant permissions in new databases (Can not select from new database tables ):  ALTER DEFAULT PRIVILEGES FOR ROLE support GRANT SELECT ON TABLES TO PUBLIC; ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES to support;   I looked at , but it about all tables within single database. It not enough for me.
I want to  GRANT SELECT     ON ALL TABLES     TO foo;   But postgres tells me I have a syntax error at "TO". It expects a GRANT like:  GRANT SELECT     ON ALL TABLES     IN SCHEMA public     TO foo;   We have a handful of tables that have been sharded such that public, shard123, and shard124 all have a table my_table, and public.my_table is the parent of both shard123.my_table and shard124.my_table. I've GRANTed SELECT to foo for public schema, but foo doesn't have permission for any of the shard schemas.  I've also done:  ALTER DEFAULT PRIVILEGES     FOR ROLE dba     GRANT SELECT     ON TABLES     TO foo;   ...which should automatically grant for any new tables and schemas made from now on.  There are 1000 &lt; n &lt; 10000 shards/schemas, so GRANTing separately for each shard/schema is impractical.  How can I GRANT to a role for all existing tables across all existing schemas (all shards)?  Or even better, can I GRANT for all schemas LIKE 'shard%'?
If $f(x)$ is continuous on $[a,b]$ and $M=\max \; |f(x)|$, is $M=\lim \limits_{n\to\infty} \left(\int_a^b|f(x)|^n\,\mathrm dx\right)^{1/n}$? Let $f(x)$ be a continuous real-valued function on $[a,b]$ and $M=\max\{|f(x)| \; :\; x \in [a,b]\}$. Is it true that: $$ M= \lim_{n\to\infty}\left(\int_a^b|f(x)|^n\,\mathrm dx\right)^{1/n} ? $$  Thanks! How to use notify-send with crontab? I really read many tutorials, but crontab doesn't start notify send.  What I've tried:   etc/crontab  added at the end:  15 * * * * notify-send 'crontab' 'test'  with crontab interface:  crontab -e   added at the end:  15 * * * * notify-send 'crontab' 'test' How to see an embedded image's dpi (ppi) in a pdf in Acrobat Pro? The following situation baffled me slightly: after preparing a pdf in a different program I wanted to make sure that an embeded image in the pdf file had the right dpi, yet I found no way in adobe acrobat pro to inspect the file/image dpi.   Can that be, or am I missing where this feature is hidden? Package incompatibilites: etoolbox, hyperref, and bm, standalone? I am trying to transition to using the etoolbox package, but seem to have run into some difficulties and they appear related to the hyperref and bm packages which to me seem totally unrelated.  The MWE example compiles since \RemoveEToolbox is defined and shows that there is no apparent problem before etoolbox was used.    Commenting out the \def\RemoveEToolbox{} line produces two problems:   With both the \renewcommand, and the usepackage{hyperref} commented, this results in "Runaway argument? Paragraph ended before \bm@test@token was complete". Including the usepackage{hyperref} (with \renewcommand commented) results in "Undefined control  sequence. \Call@AtVeryEndDocument ...cumentHook \@undefined"   But if uncomment the \renewcommand{\bm}{#1} line (effectively doing without any \bm), then this seems to compile.  I have been using this for a while now and things appeared to have been working fine, but now that I attempt to use etoolbox I seem to run into problems.  \documentclass{standalone} \def\RemoveEToolbox{}% Shows that this works fine without {etoolbox}  \usepackage{amsmath} \usepackage{xcolor} \usepackage{bm}  \ifdefined\RemoveEToolbox     \newcommand*{\iftoggle}[3]{#2}% Default to true value of "if" \else     \usepackage{etoolbox}     \newtoggle{paper}     \toggletrue{paper}      %\renewcommand{\bm}[1]{#1}% Why can't I have a normal \bm with {etoolbox}? \fi  % \usepackage{hyperref}  \begin{document}  This document is intended for  \iftoggle{paper}{paper}{electronic} distribution.  \bm{\textcolor{blue}{Solve $x^2-1=0$}}  \begin{align*}     a &amp;= b\\     \iftoggle{paper}{         c &amp;= d\\     }{}     e &amp;= f\\ \end{align*} \end{document} How can I make two objects interact I am making an animation where a person sits down on sofa. I need to make it such that when the person sits on the sofa or presses it with his hand, it deforms. However in my case, when he presses on the sofa, his hands goes trough the sofa. How can I fix this problem? Are those stars moving past the window when the ship is at warp? When the enterprise (ENT) is moving at warp we see numerous stars flying past in the windows:    However, according to , at warp 5 (the maximum speed of the 1st enterprise) it would take 7.4 days to get from the Sun to Alpha Centari, our nearest star(s) approximately 4 light years away. So to have stars whizzing past every few seconds would imply that the stars are very close together.  Is this an inaccurate depiction of star movement at warp, or is there some explanation like the warp bubble creates a lensing effect?  Now I realise the classic answer is "suspend your disbelief, it's a tv show", but the animators have at least thought about the star movement as they have added in a bit of red shift and blue shift which you can see in the image. Why was a regular train used to transport students to Hogwarts? In episode 10 of Full Metal Alchemist: Brotherhood, during the events in the Research Lab 5, Edward Elric is severely hurt. Later in the hospital, he writes down everything he had come to know, and he discusses with Alphonse, Hughes, and Armstrong about what to do with the information to continue the investigation.  At this point, King Bradley arrives with lemon into the room. He finds out what they are doing but acts very calm and chilled out and allows them to continue investigation while being careful.  Why did he not get Hughes and Armstrong killed at that point? Or at least tell them to not investigate at all? How can I play encrypted DVD movies? My machine can't play encrypted DVDs on a fresh install.  How do I add this capability?  Another useful bit of information would be what programs are best for playing DVDs, once I'm able to do so.  See the .  Will I be able to play DVD movies from ? How to mount read-write an ext4 partition on Windows? I'm reading Nano: The Essentials by T. Pradeep and I came upon this statement in the section explaining the basics of scanning electron microscopy.     However, the equation breaks down when the electron velocity approaches the speed of light as mass increases. At such velocities, one needs to do relativistic correction to the mass so that it becomes[...]   We all know about the famous theory of relativity, but I couldn't quite grasp the "why" of its concepts yet. This might shed new light on what I already know about time slowing down for me if I move faster.  Why does the (relativistic) mass of an object increase when its speed approaches that of light? I made a series of outdoor shots with Nikon D5000, with the 18-55mm 1:3.5-5.6G VR kit lens.  On some shots, I see in the EXIF info f/11, and in another shot, f/9.    How can that be, that the f-number is greater than 5.6, when that's listed as the maximum in the lens spec? By integration by parts and the substitution $x = \sin t$ we can easily calculate the integral $\int_{0}^{1} \ln (x+ \sqrt{1-x^2})dx$ which equals to $\sqrt{2} \ln (\sqrt{2} +1) -1.$ I’ve tried to use the same substitution $x = \sin t$ to calculate the integral $ \int_{0}^{1} \frac {\ln (x+ \sqrt{1-x^2})}{x}dx,$ which becomes $$ \int_{0}^{\frac {\pi}{2}} \frac {\ln \sin (t+ \frac {\pi}{4})}{\sin t}dt$$ It seems difficult to solve the particular integral. Any help? How can I monitor all and any Internet traffic from my home PC? I would like to monitor all and any Internet traffic from my home PC to see what programs installed on my home machine are accessing the Internet.  I thought I could use  for this, but I noticed Firefox traffic doesn't show up by default; you need .  What options do I have to monitor all traffic? Can I draw something on my card and play tournaments with it? Just out of curiosity, what can I do to the card, so it's still legal to play it in official tournaments?   Can I draw something over ruling texts?  Can I draw something over artwork? Can I draw something over mana cost? Can I draw something over its name?   I'll be glad to see some official rulings about it. :) Currently, the only way to link to a revision (clicking "link"), you just get  which shows what the post looked like at that revision:        Personally, I rarely use this and haven't ever found myself in a scenario (as far as I remember) where I would prefer the way it currently works to what I'm suggesting here.  Could we:   Add another link, or Change the current link   Such that it:   Displays the diff on a separate page (I'd prefer this, since the highlight and scroll thing doesn't always work properly - although perhaps it has something to do with loading images, so it might not apply here, or, if it doesn't, we could fix that instead), or          Highlights and scrolls to a diff, like what is done when you link to an answer () How could a statement be true without proof? Replace one Ubuntu with another from USB pen drive Drawing a square root spiral When do "per day" spell-like abilities recover in 3rd edition?