Lane [mailto:t...@sss.pgh.pa.us]
Sent: Wednesday, August 05, 2009 6:46 AM
To: Venkateswara Rao Bondada
Cc: Rob Sargent; pgsql-sql@postgresql.org
Subject: Re: [SQL] Create table command fails with permission denied
Venkateswara Rao Bondada writes:
> camd=# \c cms postgres
> You are now c
Venkateswara Rao Bondada writes:
> camd=# \c cms postgres
> You are now connected to database "cms" as user "postgres".
> cms=# create table test(id character varying(80));
> ERROR: could not create relation "test": Permission denied
Actually, what that is complaining about is that the operating
mission denied
cms=#
==
Thanks,
Venkat
-Original Message-
From: Rob Sargent [mailto:robjsarg...@gmail.com]
Sent: Tuesday, August 04, 2009 3:33 AM
To: Venkateswara Rao Bondada
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] Create table command f
---Original Message-
From: Rob Sargent [mailto:robjsarg...@gmail.com]
Sent: Tuesday, August 04, 2009 3:33 AM
To: Venkateswara Rao Bondada
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] Create table command fails with permission denied
Looks to me as though you are not the owner of the schema
Looks to me as though you are not the owner of the schema nor superuser
nor in a role with permission to create tables in said schema. See the
DBA if it's not you. If it is sign on as postgres (superuser) and grant
yourself some access rights.
Venkateswara Rao Bondada wrote:
Hi,
I’m new t
your problem is a little unorthodox, but i will spare you the "why the
heck do you want to do this?" discussion and assume you have good
reasons... so here's a "dynamic SQL" approach:
select 'create table test (id bigint, '|| array_to_string(array(select
a||' text' from foo),', ')||');';
not pret
"Shavonne Marietta Wijesinghe" <[EMAIL PROTECTED]> writes:
> IF (table not found) THEN
> CREATE TABLE distributors (
> did integer,
> namevarchar(40),
> UNIQUE(name)
> );
> END IF
Assuming you're in a procedure (above code snippet looks to be executed
within
Considering how related Created Types and
Tables are (at least conceptually)
it seems like a good idea to allow
Created Types to be used in the Like clause.
At least it would help me and make maintaining
my db easier and cleaner.
TJ O'Donnell
http://www.gnova.com/
> "TJ O'Donnell" <[EMAIL PROTECT
"TJ O'Donnell" <[EMAIL PROTECTED]> writes:
> Create Type xtype As (a Integer, b Text);
> Create Table xtest (Like xtype);
> ERROR: "xtype" is a composite type
Hmmm ... as you see, that's disallowed, but offhand it seems like it
wouldn't be very hard to allow it. It might be as simple as relaxing
Because being consistent is easily overlooked I would advise not to quote the
table names
Instead of calling your table thisTableIsBig call it this_table_is_big
>>> Andrew Sullivan <[EMAIL PROTECTED]> 2007-03-09 15:21 >>>
On Fri, Mar 09, 2007 at 02:56:06PM +0100, Shavonne Marietta Wijesinghe wr
On Fri, Mar 09, 2007 at 02:56:06PM +0100, Shavonne Marietta Wijesinghe wrote:
>
> But the problem i have is that when i go and open my database in
> pgadmin the table name and coloumn name is written in lowercase :(
Unquoted identifiers in PostgreSQL are folded to lower case. This is
contrary to
Shavonne Marietta Wijesinghe wrote:
> Hello
>
> From my asp page i create a table
>
> TableName = "CON01"
> strSQL = "CREATE TABLE " & TableName & " ( ID text, N_GEN serial not
> null);"
>
> But the problem i have is that when i go and open my database in pgadmin the
> table name and colou
On 3/9/07, Shavonne Marietta Wijesinghe <[EMAIL PROTECTED]> wrote:
Hello
From my asp page i create a table
TableName = "CON01"
strSQL = "CREATE TABLE " & TableName & " ( ID text, N_GEN serial not
null);"
But the problem i have is that when i go and open my database in pgadmin the
table nam
On Mon, 24 Jul 2006, Kevin Nikiforuk wrote:
> So, I've changed my code as Erik suggested:
>
> CREATE OR REPLACE FUNCTION rgio() RETURNS INTEGER as $$
> DECLARE
> lv RECORD;
>
> BEGIN
> FOR lv IN SELECT DISTINCT rg
> FROM ldevrg
> LOOP
>
>
near line 23
psql:rgio.sql:32: LINE 1: SELECT 'CREATE TABLE rgio_' || $ $1 || ' AS
psql:rgio.sql:32:
^
From: [EMAIL PROTECTED] on behalf of Erik Jones
Sent: Fri 7/21/2006 3:04 PM
To:
Rodrigo De Leon wrote:
On 7/21/06, Kevin Nikiforuk <[EMAIL PROTECTED]> wrote:
So now that I've got my loops working, on to my next newbie
question. I've created my function and in it, I want to loop through
the results of a select and for each value of my loop counter, I want
to create a new
On 7/21/06, Kevin Nikiforuk <[EMAIL PROTECTED]> wrote:
So now that I've got my loops working, on to my next newbie question. I've
created my function and in it, I want to loop through the results of a select
and for each value of my loop counter, I want to create a new table, but I
can't figu
Markus Schaber wrote:
> Hello,
>
> Recently, I wanted to create a table from a complex query in a specific
> tablespace, but CREATE TABLE name AS SELECT ... does not accept a
> tablespace argument.
>
> I worked around it by CREATE TABLE name AS SELECT ... LIMIT 0, then
> moving the generated tabl
On Tue, 2006-02-14 at 22:12 +0100, Maciej Piekielniak wrote: (snipped)
>Is anybody know how create field in a new table with data type accuiring
>from a field in other table?
>For example:
> create table new_table ( name other_table.name%TYPE);
On Wed, 15 Feb 2006 09:42, Ken Hill wrote: (snipped)
On Tue, 2006-02-14 at 23:03 +0100, Maciej Piekielniak wrote:
Hello Ken,
Tuesday, February 14, 2006, 10:30:34 PM, you wrote:
KH> On Tue, 2006-02-14 at 22:12 +0100, Maciej Piekielniak wrote:
>> Hello pgsql-sql,
>>
>> Is anybody know how create field in a new table with data type accuiring
Maciej Piekielniak <[EMAIL PROTECTED]> writes:
> Is anybody know how create field in a new table with data type accuiring
> from a field in other table?
Sorry, the %TYPE syntax only works in function declarations at the
moment.
It could possibly be made to work in table declarations --- there
Hello Ken,
Tuesday, February 14, 2006, 10:30:34 PM, you wrote:
KH> On Tue, 2006-02-14 at 22:12 +0100, Maciej Piekielniak wrote:
>> Hello pgsql-sql,
>>
>> Is anybody know how create field in a new table with data type accuiring
>> from a field in other table?
>> For example:
>>
>> create ta
On Tue, 2006-02-14 at 22:12 +0100, Maciej Piekielniak wrote:
Hello pgsql-sql,
Is anybody know how create field in a new table with data type accuiring from a field in other table?
For example:
create table new_table
(
name other_table.name%TYPE
);
Have you tried inheritance from o
JB> Offered up because I have no explanation, and curiosity overwhelms me:
JB> I was attempting to create a table from a SELECT statement against
JB> another table:
JB> create table foo
JB> as select
JB> a,
JB> f(b)
JB> from xxx;
In this command table foo populated after the select statement
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Arash Zaryoun wrote:
| Hi All,
|
| I have a table which has 'SERIAL' datatype. When I use 'create table X
| as select * from my-table' , it creates the table but without serial
| datatype. I mean without implicit sequence.
|
| test=> \d qptuser
|
On 28 Aug 2001, satish rao wrote:
> Entered below is the SQL create table syntax:
>
> CREATE TABLE lists (
> [listid] [int] IDENTITY (1, 1) NOT NULL ,
> [listname] [varchar] (200) NULL ,
> [listcreator] [varchar] (200) NULL ,
> [listdesc] [text] NULL)
create table lists
On Sun, Apr 29, 2001 at 09:34:29PM +0200, LeoDeBeo wrote:
> can anybody explain me the syntax of Create Table documentation??
...
> i also don't understand what the [ ... ] and [, ... ] means. I do know that
> brackets denote options and | alternatives.
I guess:
``[ ... ]'' means that you may
On Dom 29 Abr 2001 22:34, LeoDeBeo wrote:
> can anybody explain me the syntax of Create Table documentation??
>
> CREATE [ TEMPORARY | TEMP ] TABLE table (
> column type
> [ NULL | NOT NULL ] [ UNIQUE ] [ DEFAULT value ]
> [ column_constraint_clause | PRIMARY KEY } [ ... ]
LeoDeBeo <[EMAIL PROTECTED]> writes:
> i don't understand what the curly brace means after PRIMARY KEY (where is
> the other matching brace?
Typo. Try more recent versions of the docs. 7.1 says
CREATE [ TEMPORARY | TEMP ] TABLE table_name (
{ column_name type [ column_constraint [ ... ]
"Joy Chuang" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I tried to use CREATE TABLE AS and ORDER BY. The query is as followed:
>
> create table freshhr21 as
> select e.studentid, u.hoursxfer
> from enrollmentstatus e, undergradclass u
> where e.st
Hey,
Try:
select e.studentid, u.hoursxfer into freshhr21
from enrollmentstatus e, undergradclass u
where e.studentid = u.studentid and e.classtd = '1'
order by u.hoursxfer
Jie LIANG
Internet Products Inc.
10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873
[EMAIL
Joy Chuang <[EMAIL PROTECTED]> writes:
> But, it returns error message "ERROR: parser: parse error at or near
> "order"". Does "create table as" support "order by" inside of it?
Evidently not.
> I am using PostgreSQL 6.5.3.
It seems to work in 7.0 and later.
regards,
I believe a couple of months back... a EXECUTE command was added to plpgsql
to allow users to dynamic sql statements.
So if you get the current development version you should be able to call
EXECUTE CREATE TABLE
or whatever sql you like. (I think this is still not in 7.03, not sure though
I believe (although I haven't tried it) that pltcl will allow
you to do things such as this.
On Thu, 21 Dec 2000, Volker Paul wrote:
> Hi,
>
> > I don't think you can use DDL(data definition language) in PL/SQL.
> > create table is not DML(data munipulation language) instead
> > it's a DDL.
>
> Can this be done using tcl or perl?
I'll try them and report what I find out.
V.Paul
Hi,there,
I am not quite sure what you try to do.
However, plpgsql allows you use any DDL, most of functions defined and
sql operators.
I don't see the problem.
Jie LIANG
Internet Products Inc.
10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873
[EMAIL PROTECTED]
w
On Thu, Dec 21, 2000 at 11:51:38AM +0100, Volker Paul wrote:
> select famname || ', ' || givname from person where id=1234;
> I know it's possible by building the select e.g. in bash
> and calling psql with it as an argument, but do you see a possibility
> that is closer to Postgres, e.g. in plpgs
Hi,
> I don't think you can use DDL(data definition language) in PL/SQL.
> create table is not DML(data munipulation language) instead
> it's a DDL.
Thanks, but that leaves me with a problem.
What I really want to do is something like
select str from person where id=1234;
where str is a string th
Hi,there,
I don't think you can use DDL(data definition language) in PL/SQL.
create table is not DML(data munipulation language) instead
it's a DDL.
Jie LIANG
Internet Products Inc.
10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873
[EMAIL PROTECTED]
www.ipinc.com
Andreas Tille wrote:
> What does this mean? The ERROR is caused by the Create Table statement
> (when I removed it from my complex function it worked well).
> So why doesn't this work and what copy function fails here??
Maybe you can create your table using a select into statement :
something l
> -Original Message-
> From: Tom Lane
>
> "Hiroshi Inoue" <[EMAIL PROTECTED]> writes:
> > Hmm,Andreas's original function seems to contain other statements.
> > If the function contains DML statements for the table Temp_Num_Table,
> > it wouldn't work properly. i.e 1st call would work but
"Hiroshi Inoue" <[EMAIL PROTECTED]> writes:
> Hmm,Andreas's original function seems to contain other statements.
> If the function contains DML statements for the table Temp_Num_Table,
> it wouldn't work properly. i.e 1st call would work but 2nd call woudn't.
Are you thinking about plpgsql's cach
> -Original Message-
> From: Tom Lane
>
> Andreas Tille <[EMAIL PROTECTED]> writes:
> > web=# create function pHelpTable( )
> > web-# returns int
> > web-# As '
> > web'# Begin
> > web'# Create Table Temp_NumTable ( Num int ) ;
> > web'#
> > web'# return 17 ;
> > we
Hi, there,
I don't think that you can use DDL in PL/pgSQL, normally say , you can
only use DML in PL/pgSQL.
i.e. you can use select into,update,delete,insert ... , but you cannot use
create, alter, grant ...
Andreas Tille wrote:
> Hello,
>
> I striped down my function up to a strange thing:
>
Andreas Tille <[EMAIL PROTECTED]> writes:
> web=# create function pHelpTable( )
> web-# returns int
> web-# As '
> web'# Begin
> web'# Create Table Temp_NumTable ( Num int ) ;
> web'#
> web'# return 17 ;
> web'# End; '
> web-# language 'plpgsql' ;
> CREATE
The majori
"Paulo Roberto Siqueira" wrote:
>ufgvirtual=# create table matricula (
>ufgvirtual(# id_aluno char(15) references pessoa,
>ufgvirtual(# id_curso int4 references curso_polo,
>ufgvirtual(# id_polo int2 references curso_polo,
>ufgvirtual(# local_prova varchar(50) not null,
>ufgvirtual(# a
46 matches
Mail list logo