Thread: User can not create a new table

User can not create a new table

From
Tulio Oliveira
Date:
Hello, All

How I prevent a new user to create new tables in a Data Base ?

The Data Base is owned by "postgres" and I need that only the "postgres"
user can create new tables ...


-------

Where are the default messages thats appears when the Referentian
Integrity is violated ? I need change this message to portuguese...


regards,


tulio oliveira


--
Um velho homem sábio disse uma vez: "Quando você atualiza um exploit,
você é
bom. Quando você é o primeiro a hackear cada sucessiva versão de um
produto
que roda em milhões de computadores pela Internet, você cria uma
Dinastia".

Re: User can not create a new table

From
Stephan Szabo
Date:
On Mon, 7 May 2001, Tulio Oliveira wrote:

> Hello, All
>
> How I prevent a new user to create new tables in a Data Base ?
>
> The Data Base is owned by "postgres" and I need that only the "postgres"
> user can create new tables ...

I don't think you can allow users to connect to a db but not create
tables at this time.  You should be able to disallow connects to the
db, but I'm guessing that's not what you want.

> Where are the default messages thats appears when the Referentian
> Integrity is violated ? I need change this message to portuguese...

It's compiled in I think from  backend/utils/adt/ri_triggers.c


Fixed width COPY

From
webb sprague
Date:
Does anybody know of a good way to COPY a file into a table if the data is
based on fixed width format? Do I just have to write some code with
scanf(Ick)? For example (Sorry about the poor ASCII art formatting):

|     FIELD DESCRIPTION                LENGTH   POSITION|
 |_______________________________________________________|
 | 1.  Action (E=eff, D=del, P=pend eff)              1          1
 | 2.  Action Date (mmddyy)                              6           2-7
 | 3.  Country Code                                        3            8-10
 | 4.  filler                                             1            11
 5.  Paired Code                                  3            12-14
 | 6.  filler                                                     1        15
 | 7.  Country Name                                       65        16-80
 | 8.  Footnote code  (LERGINFO, Sec 1.1)       1         81
 | 9.  filler                                                      9    82-90

Re: Fixed width COPY

From
Tom Lane
Date:
webb sprague <wsprague@o1.com> writes:
> Does anybody know of a good way to COPY a file into a table if the data is
> based on fixed width format?

COPY insists on having delimiters; you'll need to translate the file
format into something COPY can deal with.

> Do I just have to write some code with scanf(Ick)?

If you like C, that would work, but you could doubtless accomplish the
same result with very short scripts in sed, awk, perl, tcl, or half a
dozen other text-bashing tools.  Pick your poison...

            regards, tom lane