Postgres: วิธี grant permission สำหรับ Database, schemas, tables และ sequences

ก่อนอื่นต้องเป็น user ที่มีสิทธิ์เช้าถึง database และ schema โดยการรัน SQL นี้

SELECT nspname FROM pg_catalog.pg_namespace;

คำสั่งสำหรับ grant database

GRANT ALL PRIVILEGES ON DATABASE yourDBName to yourDBUser;

ALL PRIVILEGES หมายถึง SELECTINSERTUPDATEDELETETRUNCATEREFERENCESTRIGGERCREATECONNECTTEMPORARYEXECUTE, และ USAGE

การจะ Grant table ได้ ต้องระบุ schema ที่ table นั้นๆ อยู่
คำสั่งสำหรับ grant table ในแต่ละ schema

GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA schemaName TO yourDBUser

แล้วหากเรามีหลาย schema ล่ะ ทำไงดี execute ทีล่ะ schema ก็เป็นวิธีหนึ่ง แต่จะง่ายกว่าถ้าเรา loop เพื่อ execute ทีละ schema ซึ่ง postgres สามารถทำได้เลยผ่าน function

DO $do$
DECLARE
    sch text;
BEGIN
    FOR sch IN SELECT schema_name FROM information_schema.schemata
    LOOP
        EXECUTE format($$ GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA %I TO yourDBUser $$, sch);
    END LOOP;
END;
$do$;

References

https://www.postgresql.org/docs/current/ddl-priv.html

KTC & Sephora Join up to Offer Beauty, Cosmetics, and Fashion Exclusively for KTC Card Holders

August 5, 2022 [This is a mock-up draft, but the links are official]

KTC & Sephora Join up to Offer Beauty, Cosmetics, and Fashion Exclusively for KTC Card Holders

Shop for great promotions and discounts at Sephora and Sephora online.

At 12 SEPHORA stores nationwide, the Krungthai Card Public Company (KTC) invites its dear cardmembers and any new KTC card holder to partake in active promotions and discounts.  When a KTC cardmember spends with their KTC credit card between 1 August 2022 – 31 December 2022, that KTC cardholder can redeem a special discount of up to 360 baht.  

If your Sephora total is more than 1,000 THB, you can redeem 1,000 KTC points for a 120 THB discount!   If you’re looking for a complete outfit or cosmetics kit, spending more than 3,000 THB results in a triple discount: 360 THB from your purchase.

For first-time online shoppers, KTC members who shop online with the KTC card at sephora.co.th or on the Sephora mobile app receive access to an additional, promotional 12% discount by entering the code “KTCGIFT12” on the code redemption page.  Not only is there the first-time online shopper discount, but there is also a 10% cash back redemption when a KTC cardmember uses freshly-generated KTC FOREVER points from Sephora online purchases.  

With less than 150 days until the end of the promotion on December 31st, 2022 , don’t miss out on your chance to redeem 10X KTC FOREVER points from EVERY online Sephora transaction.  

More information on registration and participation on the KTC & Sephora exclusive cardmember promotion can be found at

https://www.ktc.co.th/promotion/online/shopping/shoponline

Any potentially new cardmember interested parties may call for more information on our KTC hotline:

02 123 5000,

or

apply in person for a KTC credit card at any one of our KTC Touch branches throughout Thailand,

or

simply register online here.


Krungthai Corporate Communication Relations Public Company Limited

Khun Kantharat Jermchitphong & Khun Paradee TesratanawongPh: (02) 828-5049 | Email: ktc_pr@ktc.co.th

The Value of Coding

Social mobility. That’s what coding offers. When we learn Thai and English characters in code, we learn that the Internet is a place of opportunity.

What Kinds of Opportunities Come from the Ability to Code?

  • Increased salary
  • Better problem-solving skills
  • Heightened intelligence
  • Comprehension of the impact of technology on people
  • Work from anywhere

Whether it’s Web 1.0, 2.0, or 3.0, the Internet will remain character-based until image and audio recognition capabilities surpass current search engine algorithms.

If you learn how to code, you unlock jobs, new puzzles to solve, and a life to create.

Experiment, test, read, copy and paste, brute force your way to the cleanest code possible, and the rewards will be there for those who can see the applicable patterns.

Apply what you know, and work will come, with it money, and then, you choose what you want to do in life.

100 IELTS Part 3 Questions

Welcome to our marathon!  Today, we will be attempting to answer 100 IELTS part 3 questions without brainstorming or breaks.  This article is the beginning of our preparation and podcast on Spotify.

The IELTS exam is separated into three key sections.

  1. 3-4 mins | Identity confirmation and surface-level personal information.
  2. 3-4 mins | A speaking prompt card and a 90-120 second speech.
  3. 3-4 mins | Question and Answer segment.

Good luck!  If you’re taking the test soon and need to prepare, try asking yourself these questions in a blitz format to train yourself.  If you’re able to give a semi-decent, understandable answer to each one, you’re on your way to getting the score you need.

Each part 3 answer should include a paraphrase of the question, a point, supporting details for the point, and a conclusion/opinion/analysis.

Don’t feel limited to 30 seconds per question.  Speak your mind and develop complete thoughts.  Stop if you’re done and ready for the next question.  If you’re still going and have the examiner’s attention, and your answer is strong, keep going for up to a minute.

  1. What are the main environmental problems in your country?
  2. Why should people be concerned about the environment?
  3. How can people protect the environment?
  4. Do you think money should be spent on protecting animals?
  5. Do you think more should be done to protect natural beauty spots in your country?
  6. What can a government do to encourage people not to harm the environment?
  7. In what different ways can people keep in touch with each other?
  8. How important do you think it is to keep in touch with friends? Why/Why not? 
  9. Which way of keeping in touch do you think is most popular with young people?
  10. Now let’s consider the ways in which people change as they grow older.
  11. What are the reasons why people change as they grow older?
  12. Do you enjoy giving and receiving gifts? Why or why not?
  13. Who usually gives you gifts?
  14. Who do you give gifts to?
  15. In your country, when do people usually give gifts?
  16. What kinds of gifts do they give?
  17. Do you think gift-giving customs are different now than they were in the past? How?
  18. Do you think they will change in the future? How?
  19. What do you do?
  20. What are your responsibilities?
  21. How many hours do you work each day?
  22. Do you enjoy your work?
  23. Is there some other kind of work you would rather do?
  24. If you could change your job or profession, what would you do?
  25. Describe your education.
  26. What kind of school did you go to as a child?
  27. Did you go to a co-educational school?
  28. What was your favourite subject as a child?
  29. Who was your favourite teacher?
  30. What is the education system like in your country?
  31. Do you think your country has an effective education system?
  32. Do your friends have similar routines?
  33. Do you generally like routines?
  34. Let’s think about how people feel about routines.
  35. Do young people and old people have different attitudes to routines where you live?
  36. What are the benefits and drawbacks of having a daily routine?
  37. What factors influence most people’s daily routines?
  38. Let’s talk about international tourism.
  39. Why do you think people want to visit other countries?
  40. What makes some places very attractive to tourists?
  41. Do people travel abroad more or less than they did in the past? Why/Why not?
  42. Will international tourism increase or decrease in the future? Why?
  43. Let’s think about friends and friendship generally. How do people usually meet new friends where you live?
  44. Is it easier for adults or children to make new friends? Why?
  45. How are relationships with friends different from relationships at work/college?
  46. Is it possible for people to be close friends with their boss or teacher? Why / Why not?
  47. What type of special occasions are generally celebrated in your country?
  48. How important is it for families to celebrate occasions together? Why?
  49. Are family occasions as important today as they were for former generations?
  50. How has the role of elderly people in the family changed in recent times?
  51. In your country, which do people prefer: watching TV or listening to the radio? Why?
  52. What kinds of programs are most popular?
  53. Do men and women tend to like the same kind of programme? Why /Why not?
  54. Some people think that watching TV can be a negative influence. Would you agree?
  55. What kinds of TV programmes about different places are most popular in your country?
  56. Can people learn more about geography from TV than they can from books? Why/Why not?
  57. Do you think TV programmes about different places encourage people to travel themselves? Why/Why not?
  58. For what reasons do you think international travel has increased in recent years?
  59. What kind of foreign TV programmes are popular in your country?
  60. What are the advantages of having foreign-made programmes on TV?
  61. Some people think governments should control the number of foreign-made TV programmes being shown. Do you agree? Why?
  62. What do you think are the qualities of a good children’s TV programme? 
  63. In your country, do most grandparents live in the same house as their children and grandchildren? Why/Why not?
  64. What are the advantages and disadvantages for grandparents of living in the same house as their children and grandchildren?
  65. Do you think some people retire from their jobs too early? Why/Why not?
  66. Do people who receive a present usually open it straight away, or do they open it later? Why/Why not?
  67. Which room do families usually spend the most time in? Why?
  68. What types of things do people usually put on the walls of their rooms?
  69. Is it more important for a room to look nice, or to be comfortable? Why?
  70. How can different room colours affect the way people feel?
  71. How often do you get a holiday from work/college?
  72. Do you usually stay at home when you have a holiday, or do you go somewhere? Why/Why not?
  73. What did you do the last time you had a holiday?
  74. Do you wish you had more holidays? Why/Why not?
  75. Do you often watch sports?
  76. Do you do a lot of sports?
  77. What devices do you think will be popular in the future?
  78. Do you think people spend too much money on electronic devices?
  79. In what ways can electronic devices make our lives harder?
  80. What would the world be like without computers?
  81. Should children be taught to use computers at school?
  82. How do you think computers will change in the future?

*Will add 18 more questions. 😀

How to Communicate Effectively in 2022

Good evening fellow Toastmasters and honorable guests.

Thank you for the opportunity to engage in our question and answer session this evening.

Today, our topic is communication.

I will be giving a short presentation on what I believe are bullet points

To effective communication in 2022.

Each segment has tips and elements I would love to share over the course of 30,000 hours of interaction over the past 17 years.


Active Listening.

Active Listening is important because you can learn more by listening than speaking.

Writing the Question Down.

Writing it down makes it real.

Writing the Answer Down.

Writing a person’s answer acknowledges their mind. 

You honor them in this.

Asking for Confirmation.

Clarify, seek to understand but not attack, and hope for the best.

Point, Evidence, Analysis.

What’s your point?

Why Should Your Audience Believe You?

What Do You Think About All of This?

What, So What?, and What’s Next?

What’s the reason for speaking?

What’s the reason I should LISTEN?

What’s the next step?

Agenda, Action Steps, and Expectations.

Time is precious.  It helps to have a flow of points to cover.

End with action steps.  Then everyone knows what they’re doing next.

Make expectations clear in a polite, but firm way, with respect.

Written, Verbal, and Infographic English.

People these days take IN 

INFORMATION

In such a wide range of

Mediums.

Adapt.

For you can multiply.

Tone & Calm Manner.

Sometimes, it just doesn’t matter what you say.

Control your volume, tone, and face. 

That will protect you from, all…going crazy.

Acknowledgement.

People seek to be understood and heard.

If you acknowledge their truths, desires, and deeper motives,

You will succeed in communication.

Extension.

Seek not to deflect or conflict with a person’s logical path of words/thoughts.

When it’s your turn to speak, open with,

“I’ll extend that with,”

Or

“I agree completely.  What you say makes me think of…”

Mutual Agreement.

When people agree on a real timeline of events

And reasons

And impact

And history,

They can come to mutual agreement and succeed together.

Thank you.


We’ll be engaging in a short Q&A section on the above bullet points;

I’ll share the screen for ease of communication.

Please let me know if you have any questions by raising your hand or speaking up.

Bubble Language School Linktree

Our Links

Here are the more relevant links from the most updated Link Tree.

Bubble Language School LinkedIn

Our Main News and Education Website

Temple School Work

Toastmasters

Loopholes and Ability

Google – bubblelanguageschool.com

Bubble Language School Youtube Channel

Bubble Language School at Temple Schools

What If the Cure for Cancer Was Stuck in the Mind of Someone Who Couldn’t Afford an Education?

Bubble Language School Instagram

Bubble Language School Facebook

Tik Tok – Bubble Language School

Twitter

internationalbubble.shop (in construction)

The Agency Foundation Website

Spotify

Link Tree

The Persuasive Essay

The Persuasive Essay

Remember, effective writing happens when you effectively write to one person.

Note, even though many people could potentially read one piece of writing forever (depending on where it is), when each person reads it, it’s from one mind to another.

That’s why you should write with mainly one person in mind.

For this persuasive essay, you’re trying to convince your blue (sad) friend to try writing themselves an encouraging letter (an exercise you just did recently :D).

Persuasive Essay 5-Paragraph Outline (Suggested, Not Mandatory)

P1 – Introduction to an advantage, an issue, or concept. Thesis statement. Transition to the next paragraph.
P2 – Reasons, why the change/switch/action to take, is beneficial.
P3 – More, expansion, example, evidence, anecdote (short story)
P4 – Your opposing side’s strongest point (the person who wants to disagree with you most). Use this and turn it against that dissenter.
P5 – Conclusion:

1. Call to action.
2. Commentary on the future.
3. Review/summary of benefits.
4. Cliffhanger/question.

Reading tips:

If you read one sentence at a time and imagine that someone else is reading the next sentence, it’s kind of like talking! :D. And, it’s good for your final essay.

Persuasive – This type of essay is the opposite of an argumentative essay. It is aimed at changing the readers’ point of view completely, taking the author’s one as an axiom. It is a stronger and more difficult type of essay as it requires a better understanding of the subject and good skills in criticizing the opponents.

In most cases, persuasive essays deal with topics that are relevant here and today. A persuasive essay should be very tough and influential. By writing it, you show that you are really good at something and that you are sure that your opinion is ultimately correct. You may lose your audience the very moment you lose your integrity.

Remember that your essay has to be solid as a wall because your personal traits have no influence on a reader. It doesn’t matter how you look, speak or wear. The only weapons of yours are words. Your audience should want to accept your viewpoint as the only one that makes sense.

It is not an easy task to do. That is why it requires much practice. It is a long way to master your language to influence other people with it, but this skill is highly important in many aspects of life. Don’t worry if your first results will not be good enough. The more you try, the better you become.

These are the most common types of essays that are widespread in academic life.

Each of them requires certain skills and talents. But don’t be scared in case you find yourself unable to write them. It takes life & practice.

-Paul

The Personal Statement

“For every morning for the last 45 years of my life, my mother has prepared a simple rice porridge. The smell of it has usually wakened me every morning of my single life, and I walk down to be greeted by either my mother or the remnants of her presence from earlier in the morning. Her regularity with which she offers her hopes and beliefs to the passing monks nearby our home in the early sunlight of Thai mornings, teaches me to remain vigilant in what I think is right.”

Okay, so that’s aaaa target. The above is a blend of techniques where one switches their perspective to understand the simplicity and the beauty therein a very simple moment in time. Sometimes, the character doesn’t even know its importance; it’s up to you to find it as the writer. 

-The vignette: a moment in time. See the first sentence.
-Sensory detail: the smell of the rice and the light of the sunrise.
-Be subtle: show, don’t tell. How can you communicate values about yourself without saying, “I am adjective, adjective, and adjective.”? –> With a story and what you learned.

How long should my personal statement, [common app essay/statement of purpose/coverletter] be?

A full build will be about 500-1,500 words. Then, you’ll cut that down to the most beautiful elements and main points you want to say about yourself or in relation to the prompt-specific questions. 

How many drafts does it normally take?

Some people can do it in one draft. Others go 15 without something of decent substance. Every person has a story, read the example again if you’re starting to feel lost here. [Generally, it’s about 7 passes at a piece of writing to make it decent and passable.] #wasyoursurfboard

Good luck! 

Practical Tips:

1. Make notes in remembering a story.
2. What did you feel and what did you learn?
3. Review photos and videos, and look at the faces of those around you and yourself. What do you see? How has your mind changed and grown? That’s when you start writing.
4. Don’t delete anything until your next pass. Copy it, and start the next draft (most recent drafts should be at the top). This will be useful when/if/or you get writer’s block, or the writing’s shit. 
5. Review periodically upon events in your life, or simply time to sit down with a hot drink and build something simply pretty…with words.
6. When you are starting, take 60-seconds to mentally go through all the different ways you could possibly start, but while focusing on the SMART* goals in terms of choosing a topic. You want to be able to accomplish it in a small block of time. 

*SMART goals

Specific – When My Dad Bought Me Ice Cream
Measurable – When I Felt X Feeling
Achievable – It had to have actually happened
Realistic – Keep it simple and real. See sensory details and simplicity above.
Timely – If your brain is silent, do something else. If your brain is making noise, try just writing it down. 

Other Key Ways to Start:

1. Mindmap on Procreate, and replay the timelapse to yourself.
2. Make an outline. Ask for help with templates or search.
3. Read examples instead. 😀
4. Just do it. Stop whining in your head and write what you’re thinking. It’ll shape out to something. Maybe it’ll be useful, maybe it won’t. You don’t know that yet. You’ll know when you read it back to yourself aloud, hear it again from someone else’s voice: feedback or literally.

Tip #1 | This is where applications and letters differ. The tone with which you analyze yourself becomes more confident, and insecurities communicated are done (written) WITH PURPOSE.  This is the draft where we transition from the fundamental foundation of a letter to what a real personal statement looks like.

Tip #2 | Add a thesis statement: I’m applying to [this program and school]…write from the heart.

Tip #3 | The point of view is first person without any usage of ‘you’.

Tip #4 | For UK personal statements, a description of why you’re suited for this program is sometimes better than a narrative tone for a US application.

Nonetheless, whether the admissions officer is British or American, they’re still human, which means that what they read, they’d like to enjoy reading.

5 class comments

Paul H Park Jun 14 “Right now, I’m trying to make something. Don’t interrupt me.”

Paul H Park Jun 14 “The difference between law and medicine is merely the application of rationality and deduction to words or the human body.”

Paul H Park Jun 14 “You’re a pumpkin.” my [relationship label noun] said to me.

Paul H ParkJ un 14 | A Sample Time Block for Development…Or, A Paragraph You have 40 minutes.

You’ll need 10 minutes to independently or collaboratively review your work. You’ll need 5 minutes of some peace and calm to figure out what to do and what you could achieve in your remaining 25 minutes.

Divide that 25 minutes to two segements: 12.5 and 12.5 minutes.

Segment 1. Find a story: review pictures and timelines, mindmap, draw, anything creative.

Segment 2. Write it out. Do you best. 😀 Remember you only need a paragraph or so and that’s a start.

Paul H Park Jun 27

https://www.servicescape.com/blog/25-thesis-statement-examples-that-will-make-writing-a-breeze

Add class comment…