pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
rules
6+ messages / 4 participants
[nested] [flat]

* rules
@ 2004-05-19 17:14  Jie Liang <jie@stbernard.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Jie Liang @ 2004-05-19 17:14 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin



-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us] 
Sent: Tuesday, May 18, 2004 5:19 PM
To: Nico De Ranter
Cc: postgres-list
Subject: Re: [ADMIN] "IDENT authentication failed" but I'm not using
ident 


Nico De Ranter <nico@sonycom.com> writes:
> \connect: FATAL:  IDENT authentication failed for user "nico"

> I changed /etc/postgresql/pg_hba.conf so it only contains
>   local    all     all   trust=20
> and restarted postgres but I still get the same error message. Any 
> idea why the import complains about IDENT authentication when=20 I'm 
> not even using it and how to get around it?

If you're getting that message then you *are* using IDENT auth. My bet
is that you changed the wrong config file.  /etc/postgresql is not a
very standard name for a Postgres data directory ...

> BTW: is there a way to create a database and then change ownership to 
> somebody else?

No, but you can do it in one step.

http://www.postgresql.org/docs/7.4/static/sql-createdatabase.html

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* rules
@ 2004-05-19 17:20  Jie Liang <jie@stbernard.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Jie Liang @ 2004-05-19 17:20 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin; pgsql-sql@postgresql.org

According to the document of rule:

CREATE RULE rulename AS ON delete TO mytablename DO
(
delete from aaa where id=OLD.id;
Delete from bbb where id=OLD.id;
Delete from ccc where id=OLD.id
);


Should work, but it doesn't, what wrong with it?
Even I use { .... }

Jie Liang



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: rules
@ 2004-05-19 17:41  Jie Liang <jie@stbernard.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Jie Liang @ 2004-05-19 17:41 UTC (permalink / raw)
  To: Jie Liang <jie@stbernard.com>; Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin; pgsql-sql@postgresql.org

Sorry, wrong question.

-----Original Message-----
From: Jie Liang 
Sent: Wednesday, May 19, 2004 10:20 AM
To: Tom Lane
Cc: postgres-list; pgsql-sql@postgresql.org
Subject: [ADMIN] rules


According to the document of rule:

CREATE RULE rulename AS ON delete TO mytablename DO
(
delete from aaa where id=OLD.id;
Delete from bbb where id=OLD.id;
Delete from ccc where id=OLD.id
);


Should work, but it doesn't, what wrong with it?
Even I use { .... }

Jie Liang

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if
your
      joining column's datatypes do not match



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [SQL] rules
@ 2004-05-19 17:50  Stephan Szabo <sszabo@megazone.bigpanda.com>
  parent: Jie Liang <jie@stbernard.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Stephan Szabo @ 2004-05-19 17:50 UTC (permalink / raw)
  To: Jie Liang <jie@stbernard.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-admin; pgsql-sql@postgresql.org

On Wed, 19 May 2004, Jie Liang wrote:

> According to the document of rule:
>
> CREATE RULE rulename AS ON delete TO mytablename DO
> (
> delete from aaa where id=OLD.id;
> Delete from bbb where id=OLD.id;
> Delete from ccc where id=OLD.id
> );
>
>
> Should work, but it doesn't, what wrong with it?

What is it doing and what version is this on?




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: rules
@ 2004-06-25 07:16  Jan Norman Pedersen <jan@multimediasyd.dk>
  parent: Stephan Szabo <sszabo@megazone.bigpanda.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Jan Norman Pedersen @ 2004-06-25 07:16 UTC (permalink / raw)
  To: pgsql-sql@postgresql.org

Anslag

"Stephan Szabo" <sszabo@megazone.bigpanda.com> wrote in message
news:20040519104830.J85664@megazone.bigpanda.com...
> On Wed, 19 May 2004, Jie Liang wrote:
>
> > According to the document of rule:
> >
> > CREATE RULE rulename AS ON delete TO mytablename DO
> > (
> > delete from aaa where id=OLD.id;
> > Delete from bbb where id=OLD.id;
> > Delete from ccc where id=OLD.id
> > );
> >
> >
> > Should work, but it doesn't, what wrong with it?
>
> What is it doing and what version is this on?
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Rules
@ 2010-06-15 06:09  Ricardo Bayley <ricardo.bayley@gmail.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Ricardo Bayley @ 2010-06-15 06:09 UTC (permalink / raw)
  To: pgsql-admin

Hi Fellows,

I have a table with 55 columns or so, plus one extra column of datatype
geometry, I am using PostGIS.
I intend to split my table into 3 tables. So each may have 25 to 30 columns
each.

I've  created a View which relates all 3 tables with their pk and fk
accordingly. This VIEW has a RULE .....

*ON INSERT TO public.mytable DO INSTEAD*
I listed 3 ACTIONS in order to insert data into all 3 different tables.

I am having trouble getting the main table“s primary key value. I use the
currval('mytable_sequence_id')
It works fine only if I do not insert multiple records at once. If I do
insert multiple records, the currval gets the last value and not each
inserted value. Hence, all my records in my 2 related tables have foreign
key = to the last primary key.

I guess I am doing something wrong, either I am missing something or my
approach is incorrect.

Do you know how should I accomplish this ? Any ideas ?


Thanks in advanced.


Ricardo

^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2010-06-15 06:09 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-05-19 17:14 rules Jie Liang <jie@stbernard.com>
2004-05-19 17:20 rules Jie Liang <jie@stbernard.com>
2004-05-19 17:50 ` Stephan Szabo <sszabo@megazone.bigpanda.com>
2004-06-25 07:16   ` Jan Norman Pedersen <jan@multimediasyd.dk>
2004-05-19 17:41 Re: rules Jie Liang <jie@stbernard.com>
2010-06-15 06:09 Rules Ricardo Bayley <ricardo.bayley@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox