Web site design - CHAPTER 28 FROM DATABASES TO DATATYPES ALTER
CHAPTER 28 FROM DATABASES TO DATATYPES ALTER DOMAIN us_phone_number SET NOT NULL; This combination would change the owner of the domain to a database user named amber: ALTER DOMAIN us_phone_number OWNER TO amber; Dropping Domains You can remove a domain from the database by using the DROPDOMAIN command. By default, you cannot drop a domain that is referenced inside another database object. However, you can control this behavior by using the CASCADE or RESTRICT keyword along with the DROP command: DROP DOMAIN us_phone_number CASCADE; Note The DROP CASCADE command may have different effects depending on the dependent object. For example, if a table references the domain, only the column in question will be dropped. However, if a view references the domain, the entire view will be dropped. Summary In this chapter, you learned about the many ingredients that go into designing a PostgreSQL database. The chapter began with an overview of some helpful commands for dealing with databases, schemas, and tables. This discussion was followed by an introduction to PostgreSQL s supported datatypes, offering information about the name, purpose, and range of each. The chapter then examined many of the most commonly used attributes, which serve to further tweak column behavior. The chapter concluded with a discussion of how to make use of more advanced datatype objects, including composite datatypes and domains, to help simplify datatype management. In the next chapter, we ll dive into another key PostgreSQL feature: security. You ll learn all about PostgreSQL s powerful authentication system, as well as learn more about how to secure the PostgreSQL server and create secure PostgreSQL connections using SSL.
Check Tomcat Web Hosting services for best quality webspace to host your web application.