Re: [SQL] [?]Nobody hasn't add column?

Поиск
Список
Период
Сортировка
От Remigiusz Sokolowski
Тема Re: [SQL] [?]Nobody hasn't add column?
Дата
Msg-id Pine.GS4.4.02A.9905281054320.17087-100000@netra.gdansk.sprint.pl
обсуждение исходный текст
Ответ на [?]Nobody hasn't add column?  (curry <curry@mail.knm.net>)
Список 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 по дате отправления:

Предыдущее
От: curry
Дата:
Сообщение: [?]Nobody hasn't add column?
Следующее
От: Stuart Rison
Дата:
Сообщение: [SQL] 'denormalising' with a select