Search Postgresql Archives

Re: userdefined types

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx> wrote:
> Assad Jarrahian <jarraa@xxxxxxxxx> 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
>


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux