You can query the PG_TABLE_DEF system catalog view to view the definition of a table in Redshift database. SELECT *
Continue readingHow to list all Stored Procedures in Redshift database
You can query the system catalog view pg_proc_info to list all the stored procedures in a Redshift database. pg_proc_info view
Continue readingPostgresql – how to declare a variable
Syntax: A variable declaration requires a variable name and a data type. Example: You can optionally specify a default value
Continue readingCoalesce function in Redshift database
In Redshift database, COALESCE is the alias for NVL function. Both NVL and COALESCE return the same output. NVL returns
Continue readingHow to concatenate columns in Redshift database
Concatenation of values can be done either by using the concatenation operator || or the CONCAT function. Resulting output is
Continue readingView and modify current_schema and search_path in Redshift database
Run the below select statement to view the ‘current schema’. ‘Current schema’ is the default schema for database object creation
Continue readingPostgreSQL – Revoke super user privileges
You can revoke the super user privileges previously granted to a database user by running the below sql command where username is
Continue readingHow to get the list of all User Defined Functions in Redshift database
You can query the pg_proc_info system catalog view to list all the user defined functions in a redshift database. pg_proc_info
Continue readingHow to extract the ddl of a function in Redshift database
You can query the pg_proc system catalog table to view the definition of a user defined function(UDF) in Redshift database
Continue reading