Postgres VARCHAR vs TEXT

Introduction If you’re working with PostgreSQL, it’s important to have a solid understanding of the different data types so that you can choose the correct ones when creating your database tables. Two common character types used in PostgreSQL are the TEXT and VARCHAR types. Although there are many similarities between these two types, there are … Continued

How to Create a Function in PostgreSQL

Introduction Although PostgreSQL offers a wide variety of built-in functions, there are times you’ll want to create your own function to meet your application’s requirements. It’s easy to accomplish this task with the help of the CREATE FUNCTION statement, which allows you to build a new PostgreSQL function or replace an existing one. In this … Continued

How to Use PostgreSQL Date Functions

Introduction If you’re using PostgreSQL to store and query your data, there will likely be times when you need to obtain the current date or the current time for your applications. You may even want to calculate a student or employee’s age. Fortunately, PostgreSQL offers a number of useful date and time functions to help … Continued

SQL OR Statement with PostgreSQL

Introduction Being able to select the exact data you need is vital in all database technologies. One of the most common operators you can use is the OR operator. If you’re unfamiliar with the SQL OR operator then this article will be a great introduction to it’s use. In this article we’ll be using PostgreSQL … Continued

SQL DELETE Statement using PostgreSQL

Introduction If you’re getting your feet wet with SQL database technology and learning the basic commands, the DELETE statement will quickly be on your radar. In this article we cover the SQL DELETE statement and will show a few different ways to use the command. We will demo with PostgreSQL a tried and true SQL … Continued

How to Use PL/pgSQL function Parameters

Introduction In this article we will learn how to use PL/pgSQL function parameters in PostgreSQL. Prerequisites Basic understanding on PostgreSQL trigger. Ensure that PostgreSQL server is properly installed, configured and running on the background. For Linux and Windows systems you can download PostgreSQL here To start PostgreSQL server use a LINUX machine use the following … Continued

SQL NOT LIKE with PostgreSQL

Introduction Much of the data we store in our databases is text and we need advanced ways of filtering it for the exact data we need. Filtering data can become very complex and there are several ways PostgreSQL enables you to search for it. PostgreSQL in particular offers three ways to do pattern matching, LIKE, … Continued

PostgreSQL Composite Primary Keys

Introduction In this article we’ll be discussing composite primary keys in PostgreSQL. Primary keys are a way to uniquely identify a record. More often than not we use simple arbitrary id numbers that progress sequentially whenever a new record is created. But in certain scenarios you don’t need an arbitrary number to guarantee uniqueness, you … Continued

Primary Key in SQL with PostgreSQL

Introduction In this article we’ll cover what a primary key is in SQL programming languages and go over a concrete example using PostgreSQL. What is a Primary Key A primary key is a column in a table which must have a unique value so that each row in a table has at least one unique … Continued

Keep in the know!

Subscribe to our emails and we’ll let you know what’s going on at ObjectRocket. We hate spam and make it easy to unsubscribe.