Procedure calling syntax with complex types

From: <btober(at)computer(dot)org>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Procedure calling syntax with complex types
Date: 2004-05-06 01:30:10
Message-ID: 65036.66.212.203.4.1083807010.squirrel@$HOSTNAME
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Say I have a type defined as

city (varchar, varchar(2), numeric, numeric)

What would be the syntax for calling a stored procedure defined with this
type as a parameter, i.e., something like

CREATE FUNCTION public.city_insert(city)
RETURNS ...

That is, I want to do something like

SELECT public.city_insert(CAST('Waterford', 'CT', 41.346853,-72.14582) AS
city);

but I don't think this syntax works.

--Berend Tober

Browse pgsql-general by date

  From Date Subject
Next Message Tatsuo Ishii 2004-05-06 01:51:39 error code with psql
Previous Message Tom Lane 2004-05-06 01:09:25 Re: CHECK constraints and optimizations