Posts Tagged ‘SET’

Using memset or bzero on structs in C is a common way to clear the values contained within that struct. This generally works well in C as your structs will contain POD types, unions and other structs. However, in C++, these structs (or struct members) may also contain methods which assume the struct is in […]

It’s often useful to concatenate two fields together in an SQL query. In PostgreSQL, fields may be concatenated using the || operator. The syntax is really simple. Just place the double bar between the fields you want to join, and (optionally) give a label to that new field. Strings can also be concatenated with the […]

Union (∪) and Intersection (∩) symbols in LaTeX can be produced via the \cup and \cap definitions while in math mode. No extra packages are required to use these symbols. For example: Let $L_C = L_A \cap (L_B \cup L_C)$ will produce:

In Bash you quite often need to check to see if a variable has been set or has a value other than an empty string. This can be done using the -n or -z string comparison operators. The -n operator checks whether the string is not null. Effectively, this will return true for every case […]

USE [schema_name] in PostgreSQL

Posted: 17th November 2009 by Tim in PostgreSQL
Tags: , , , , ,

For those moving from MySQL to PostgreSQL, there are a few differences which you will need to get used to. One of these differences is the USE command, used to select the schema to select tables, views, etc from. PostgreSQL does not have the USE command. Instead, you can use: SET search_path TO [schema_name] For […]