Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
PostgreSQL 11 Server Side Programming Quick Start Guide

You're reading from   PostgreSQL 11 Server Side Programming Quick Start Guide Effective database programming and interaction

Arrow left icon
Product type Paperback
Published in Nov 2018
Publisher
ISBN-13 9781789342222
Length 260 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Luca Ferrari Luca Ferrari
Author Profile Icon Luca Ferrari
Luca Ferrari
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Variables and variable assignment

A variable is a placeholder for a value and is identified by a valid name and a type. Variable types are those that PostgreSQL allows within a table definition, including user-defined types. A variable can either hold a single value or multiple values of the same type in an array. If it holds a single value, such as an integer, it is called a scalar.

A variable can also handle more complex types, such as tuples, which represent table rows or query results. These variables are called records. There are two specific types of record variable: record and rowtype. The record type is a general abstract type that can handle any specific tuple structure, while rowtype can handle well-defined tuple structures and is therefore tied to a specific result set structure. In other words, a record variable can interchangeably hold a tuple coming from the files...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image