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

From: Remigiusz Sokolowski <rems(at)gdansk(dot)sprint(dot)pl>
To: curry <curry(at)mail(dot)knm(dot)net>
Cc: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] [?]Nobody hasn't add column?
Date: 1999-05-28 08:59:11
Message-ID: Pine.GS4.4.02A.9905281054320.17087-100000@netra.gdansk.sprint.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 error
Rem
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(at)gdansk(dot)sprint(dot)pl * *
-----------------------------------------------------------------*****----------

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Stuart Rison 1999-05-28 15:44:45 [SQL] 'denormalising' with a select
Previous Message curry 1999-05-28 08:34:10 [?]Nobody hasn't add column?