Re: [SQL] how to return whole table from Function not just the id integer column

2012-01-19 Thread Samuel Gendler
On Thu, Jan 19, 2012 at 1:57 AM, Rehan Saleem wrote: > hi , > > how can i return the whole user table from this function not just the id . > thanks > > Chapter 39, specifically 39.3, of the postgresql documentation provides all of the information necessary to answer this question. If, after rea

[SQL] how to return whole table from Function not just the id integer column

2012-01-19 Thread Rehan Saleem
hi , how can i return the whole user table from this function not just the id . thanks CREATE TABLE users(id serial PRIMARY KEY, first_name varchar(10), last_name varchar(10)); CREATE OR REPLACE FUNCTION new_user(fname varchar, lname varchar) RETURNS int AS $$ DECLARE r int; BEGIN -- custom except