Robert Paulsen wrote:
This still requires me to modify the overall database structure but not the
original item table. As my reward :) I get to use any type I choose for each
new attribute.
The whole point of the database structure is to accurately reflect the
requirements of your data. If yo
Hi all
the serious problem with permissions is encountered
NOTE: the following example is really useful but there is no room to
describe it's use.
db=# CREATE USER u;
db=# CREATE TABLE t (i int, a text);
db=# REVOKE all ON t FROM u;
db=# GRANT update,insert,delete ON t TO u;
db=# \c - u
db=>
Hi Fellow PostgreSQL users,
Just a question here.
Is there any bad effect on the PostgreSQL performance If I encounter many
fails on inserting records to database with primary key column.
For example I have this table
CREATE TABLE unique_items
(
item_id text NOT NULL,
CONSTRAINT unique_item
On Monday 13 March 2006 03:03, Richard Huxton wrote:
> Robert Paulsen wrote:
> > This still requires me to modify the overall database structure but not
> > the original item table. As my reward :) I get to use any type I choose
> > for each new attribute.
>
> The whole point of the database struct
Hi, Tom,
Tom Lane wrote:
> The behavior of the subquery expression is dictated by the SQL spec:
>
> 1) If the cardinality of a or a is
> greater than 1, then an exception condition is raised: cardinal-
> ity violation.
That's interesting to know, and it seems
Hello,
let's say I have created a postgresql-7.2.2 db using the following cmds:
CREATE TABLE status
(
id SERIAL NOT NULL PRIMARY KEY,
name VARCHAR(32)
);
CREATE TABLE event
(
id SERIAL NOT NULL PRIMARY KEY,
O Robert Urban έγραψε στις Mar 13, 2006 :
> Hello,
>
> let's say I have created a postgresql-7.2.2 db using the following cmds:
>
> CREATE TABLE status
> (
> id SERIAL NOT NULL PRIMARY KEY,
> name VARCHAR(32)
> );
>
> CREATE TABLE event
>
> Objet : Re: [SQL] Ask a PostgreSql question (about select )
>
> Please post questions to the list. I'm forwarding this to the SQL
> list, as I think it's probably most applicable. I don't know much
> about the Oracle syntax you've used. Hopefully someone will be able
> to help you.
>
> On Mar 1
On Mon, 2006-03-13 at 12:51 +0300, Eugene E. wrote:
> Hi all
> the serious problem with permissions is encountered
>
> NOTE: the following example is really useful but there is no room to
> describe it's use.
>
>
> db=# CREATE USER u;
> db=# CREATE TABLE t (i int, a text);
> db=# REVOKE all ON
Rod Taylor wrote:
> By allowing the user a where clause you grant them select privileges.
> You will find that delete works the same way.
>
> This is one of those times when per column permissions are useful. You
> could grant them select access on the "name" column but not the "salary"
> column.
Markus Schaber <[EMAIL PROTECTED]> writes:
> Tom Lane wrote:
>> The fact that the other form is even allowed is more of a holdover from
>> PostQUEL than something we have consciously decided is a good idea.
>> (IMHO it's actually a fairly *bad* idea, because it does not work nicely
>> when there's
On Mon, 2006-03-13 at 10:46 -0400, Alvaro Herrera wrote:
> Rod Taylor wrote:
>
> > By allowing the user a where clause you grant them select privileges.
> > You will find that delete works the same way.
> >
> > This is one of those times when per column permissions are useful. You
> > could grant
"Eugene E." <[EMAIL PROTECTED]> writes:
> db=# REVOKE all ON t FROM u;
> db=# GRANT update,insert,delete ON t TO u;
> db=# \c - u
> db=> INSERT INTO t VALUES (1,'x');
> INSERT
> db=> UPDATE t SET a='y' WHERE i=1;
> ERROR: Permission denied for relation t;
> db=> UPDATE t SET a='y';
> UPDATE
This
Hi,
I'm searching for an Oracle START WITH ... CONNECT BY PRIOR ...
equivalence. It seems that PostgreSQL (version >= 7.4) supports a
function connectby that provides similar feature. Unfortunately I don't
find any documentation on that function. Could you please give me a
link on such document
Achilleus Mantzios <[EMAIL PROTECTED]> writes:
> O Robert Urban Ýãñáøå óôéò Mar 13, 2006 :
>> how can I get rid of the "not null" modifier on status_id?
> ALTER TABLE event ALTER status_id DROP NOT NULL;
I don't think 7.2 has that. Of course, there are many excellent reasons
why Robert needs t
On Mon, Mar 13, 2006 at 10:37:37AM -0500, Daniel Caune wrote:
> I'm searching for an Oracle START WITH ... CONNECT BY PRIOR ...
> equivalence. It seems that PostgreSQL (version >= 7.4) supports a
> function connectby that provides similar feature. Unfortunately I don't
> find any documentation on
Christian Paul B. Cosinas wrote:
Then I have a program that insert 1(one) million times like this:
Insert into unique_items(item_id) values('Item001)
Ofcourse we all know that it will fail because there is already a record in
the database.
Would there be any bad effect on the database or none
What information can be retrieved from a structure by being able to
update all rows?
Write a plpgsql function snoop(x) which inserts x into a table 'log'
created by you, and also returns x.
UPDATE users SET password=snoop(password).
Read log table.
Done.
If you h
> -Message d'origine-
> De : Michael Fuhr [mailto:[EMAIL PROTECTED]
> Envoyé : lundi, mars 13, 2006 11:12
> À : Daniel Caune
> Cc : postgresql sql list
> Objet : Re: [SQL] connectby documentation
>
> On Mon, Mar 13, 2006 at 10:37:37AM -0500, Daniel Caune wrote:
> > I'm searching for an O
7.4?! Huh... Is there any sources.list a bit more updated? Where can I
download PostgreSQL contrib modules. The documentation 8.1 doesn't help
so much. Where can I find more documentation on available contrib.
modules?
gentoo automatically compiles and installs the contribs (you just
> "outdated" packets is unfortunately a big issue on Debian. If you want
> to have up-to-date apt-packages try
>
> www.backports.org
>
> Add one of the mirrors from the list to your sources.list, then run
> apt-get update and then try to install again ...
> :-) And you'll see, that you can instal
Hello all,
Does anyone have available plpgsql codes to update all capital letters
in a column to "the first character is capital and the rest is small" ?
For example, in tableA(id, description)
001, 'ZHANG ZHE XIN' =>
'Zhang Zhe Xin'
002, 'LIU
Emi Lu wrote:
> Hello all,
>
> Does anyone have available plpgsql codes to update all capital letters
> in a column to "the first character is capital and the rest is small" ?
I don't know about plpgsql codes, but there is a function initcap() that
you can use for that.
alvherre=# select initca
I got the answer from the docs. |initcap|(text)
thanks anyway,
Ying
Hello all,
Does anyone have available plpgsql codes to update all capital letters
in a column to "the first character is capital and the rest is small" ?
For example, in tableA(id, description)
001, 'ZHANG ZHE XIN'
On Mon, Mar 13, 2006 at 04:56:39PM -0500, Daniel Caune wrote:
> Sorry, this is not my day: "apt-get install postgresql-contrib-8.1"
> works fine... Just a link on the documentation that fully explains how
> connectby() works would be great! :-)
The contrib package should have installed a file nam
I saw it from the docs as well. Thank you Alvaro :)
Alvaro Herrera wrote:
Emi Lu wrote:
Hello all,
Does anyone have available plpgsql codes to update all capital letters
in a column to "the first character is capital and the rest is small" ?
I don't know about plpgsql codes, but
> > Sorry, this is not my day: "apt-get install postgresql-contrib-8.1"
> > works fine... Just a link on the documentation that fully explains
how
> > connectby() works would be great! :-)
>
> The contrib package should have installed a file named
README.tablefunc.
>
You are right. The documen
> > > Sorry, this is not my day: "apt-get install
postgresql-contrib-8.1"
> > > works fine... Just a link on the documentation that fully
explains
> how
> > > connectby() works would be great! :-)
> >
> > The contrib package should have installed a file named
> README.tablefunc.
> >
>
> You are
On Mon, Mar 13, 2006 at 06:38:14PM -0500, Daniel Caune wrote:
> I provide hereafter a description about how to install the function
> connectby (I didn't find such documentation and I don't know where to
> write this documentation):
README.tablefunc contains instructions on how to load the module
> -Message d'origine-
> De : Michael Fuhr [mailto:[EMAIL PROTECTED]
> Envoyé : lundi, mars 13, 2006 19:26
> À : Daniel Caune
> Cc : [EMAIL PROTECTED]; postgresql sql list
> Objet : Re: [SQL] connectby documentation
>
> On Mon, Mar 13, 2006 at 06:38:14PM -0500, Daniel Caune wrote:
> > I p
On Mon, Mar 13, 2006 at 07:29:44PM -0500, Daniel Caune wrote:
> > > Replace "$libdir" by "/usr/lib/postgresql/8.1/lib/tablefunc.so" (I
> > > suggest to modifying only a copy of this file).
> >
> > That shouldn't be necessary unless the package installed the shared
> > objects somewhere other than
unsubscribe
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your
unsubscribe
unsubscribe
This message is intended only for the use of the individual(s) or entity to which it is addressed and may contain information that is privileged, confidential, and/or proprietary to RealPage and its affiliated companies. If the reader of this message is not the intended recip
Tom Lane wrote:
"Eugene E." <[EMAIL PROTECTED]> writes:
db=# REVOKE all ON t FROM u;
db=# GRANT update,insert,delete ON t TO u;
db=# \c - u
db=> INSERT INTO t VALUES (1,'x');
INSERT
db=> UPDATE t SET a='y' WHERE i=1;
ERROR: Permission denied for relation t;
db=> UPDATE t SET a='y';
UPDATE
PFC wrote:
What information can be retrieved from a structure by being able to
update all rows?
Write a plpgsql function snoop(x) which inserts x into a table
'log' created by you, and also returns x.
UPDATE users SET password=snoop(password).
Read log table.
Done.
This
Eugene E. wrote:
PFC wrote:
What information can be retrieved from a structure by being able to
update all rows?
Write a plpgsql function snoop(x) which inserts x into a table
'log' created by you, and also returns x.
UPDATE users SET password=snoop(password).
Read log tab
Hi people,
testing=# INSERT INTO foo (SELECT * FROM foo WHERE foo_id = 2);
ERROR: duplicate key violates unique constraint "foo_pkey"
testing=#
testing=# INSERT INTO foo (foo_1, foo_2, foo_3 ...) (SELECT foo_1, foo_2,
foo_3 ... FROM message_table WHERE foo_id = 10);
INSERT 717286 1
testing=#
I
38 matches
Mail list logo