Re: Postgresql -- initial impressions and comments - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Postgresql -- initial impressions and comments
Date
Msg-id 20021203211901.GA15415@wolff.to
Whole thread Raw
In response to Postgresql -- initial impressions and comments  ("j.random.programmer" <javadesigner@yahoo.com>)
Responses Re: Postgresql -- initial impressions and comments  (Joe Conway <mail@joeconway.com>)
List pgsql-general
On Mon, Dec 02, 2002 at 18:44:03 -0800,
  "j.random.programmer" <javadesigner@yahoo.com> wrote:
>
> 4) The auto-increment ("serial") fields are very
> badly documented.
>
> Normally, I want to say something like:
>
>   INSERT into foo values (null, 'a', 'b',...)
>
> where the first field is defined as serial. However
> I can't send null to that field and expect it to be
> auto incremented - I have to either list out my
> fields in the statment (and omit the serial field):

Use the keyword DEFAULT instead of NULL.

> 5) There is no way to grant permissions on all tables
> within a database to some user. You have to grant
> permissions on each table one-by-one. What I want
> to do (and mysql allows this) is something like:
>
> GRANT ALL on foodb.* to user_bar;

You can get the list of tables from the system catalog and then issue
grant statements for them. You could write a function to do this,
do it in an application or write sql query output to a script which
you then execute.

pgsql-general by date:

Previous
From: Steve Crawford
Date:
Subject: Arrays: null values beyond end of array
Next
From: Bruno Wolff III
Date:
Subject: Re: getting query result into a file