From: | Assad Jarrahian <jarraa(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: userdefined types |
Date: | 2006-01-09 07:19:20 |
Message-ID: | 4bd3e1480601082319q3f426b5aw5f896cb89b64e7e2@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
C code (I am confused, are you talking about c-functions and types,
cause I don't have any!)
all I have is listed below (with the last query not working)
So getting back to user-defined types, is it REALLY necessary to have
the in-out functions (just to note, I am using jdbc with the db)
Thanks!
-assad
CREATE TYPE address AS
(bldgname varchar,
bldgzone varchar,
bldgfloor varchar,
bldgroom varchar,
street varchar,
crossing1 varchar,
crossing2 varchar,
city varchar,
state varchar,
zip varchar,
district varchar,
county varchar,
country varchar,
countrycode varchar,
phonenumber varchar,
ext varchar,
url varchar);
CREATE TABLE userprofiles
(
username varchar(32) NOT NULL,
address address,
CONSTRAINT table_profiles PRIMARY KEY (username)
)
UPDATE userprofiles SET address = ROW(''
,'','','','','','','','','','','','','','','','') where
username='mooreg3';
Query returned successfully: 1 rows affected, 156 ms execution time.
UPDATE userprofiles SET address = ROW(
,'','','',,'',,'','','','','','','','','','') where
username='mooreg3';
ERROR: syntax error at or near "," at character 41
On 1/9/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Assad Jarrahian <jarraa(at)gmail(dot)com> writes:
> > it does not like the commas one after the other (empty value) .... how
> > do I solve that .... or does this have something to do with those two
> > methods (in and out) that I overlooked.
>
> > any insight would be much appreciated.
>
> You have not given us nearly enough information. "It does not like"
> is not adequate: show the *exact* error message. (Even if the details
> mean nothing to you, they might mean something to other people.)
>
> Given the context, I suspect there's something wrong with your C code
> and you'll have to show us the code to get any useful help. But I am
> just speculating on the basis of no evidence whatsoever ...
>
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-01-09 08:54:48 | Re: userdefined types |
Previous Message | Tom Lane | 2006-01-09 07:10:17 | Re: userdefined types |