Re: [SQL] [?]Nobody hasn't add column? - Mailing list pgsql-sql

From Remigiusz Sokolowski
Subject Re: [SQL] [?]Nobody hasn't add column?
Date
Msg-id Pine.GS4.4.02A.9905281054320.17087-100000@netra.gdansk.sprint.pl
Whole thread Raw
In response to [?]Nobody hasn't add column?  (curry <curry@mail.knm.net>)
List pgsql-sql
> I'm first time in postgresql...
> Um....
> I made little program... with C and postgres on the web.
> Everything is OK.
> But I want to add a column.
> So
> .......
>   sprintf(rest, "alter table danga add (a%s float)",entries[0].val);
>   res = PQexec(conn, rest);
>   if (PQresultStatus(res) != PGRES_COMMAND_OK) {
>     fprintf(stderr,"command failed\n");
>     PQclear(res);
>   printf("###");
>     exit_nicely(conn);
>   }
>   PQclear(res);
> .........
> 
> Excute this program print JUST
> 
> ###
> 
> WHY?
> Maybe Nobody hasn't create column.... I don't know...

May be :-)
First just check if You have created user with name nobody in database.
After that check if this user has appropriate permissions to Your table.
I'm not sure, but it is possible, that tables can be modified only by
its owners and probably by superusers.
So if You create table as xxxuser and after try to modify it by nobody -
You get errorRem
p.s.
You can solve this by:
- firstly creating table as nobody ( I recommend this )
- give nobody permissions of superuser

-------------------------------------------------------------------*------------
Remigiusz Sokolowski      e-mail: rems@gdansk.sprint.pl           * *        
-----------------------------------------------------------------*****----------



pgsql-sql by date:

Previous
From: curry
Date:
Subject: [?]Nobody hasn't add column?
Next
From: Stuart Rison
Date:
Subject: [SQL] 'denormalising' with a select