From: | jwieck(at)debis(dot)com (Jan Wieck) |
---|---|
To: | Andreas(dot)Zeugswetter(at)telecom(dot)at (Zeugswetter Andreas SARZ) |
Cc: | jwieck(at)debis(dot)com, pgsql-hackers(at)hub(dot)org |
Subject: | Re: AW: [HACKERS] Solution to the pg_user passwd problem !?? (c) |
Date: | 1998-02-19 15:48:40 |
Message-ID: | m0y5YDJ-000BFRC@orion.SAPserv.Hamburg.dsh.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Andreas wrote:
>
> Okay :-(
>
> But: I think this is an error in the rewrite system. I think this query
> should get rewritten !
> Can we fix this ?
>
> > > Can all of you try to crack this ?
> >
> > Cracked!
> >
> > create table get_passwds (usename name, passwd text);
> > insert into get_passwds select usename, passwd from pg_user;
> > select * from get_passwds;
> > usename|passwd
> > -------+------
> > pgsql |
> > wieck |test
> > (2 rows)
Right - it's an error in the rewrite system. The retrieve
(SELECT) rule rewriting is only done if the command in the
query is a SELECT. But this time it's an INSERT and the
rewrite system only looks for rules on the result relation
(as far as I understood the coding). It doesn't process the
complete rangetable and no rewriting is done at all.
As a side effect it is also impossible to
INSERT INTO tab SELECT anything FROM view;
And this should really get fixed. I'll take a deep breath and
then a look at it. But that will take some time.
Until later, Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#======================================== jwieck(at)debis(dot)com (Jan Wieck) #
From | Date | Subject | |
---|---|---|---|
Next Message | Brook Milligan | 1998-02-19 15:52:15 | Re: [HACKERS] libpgtcl undefined symbol error with pgaccess-0.76 |
Previous Message | al dev | 1998-02-19 15:46:25 | unsubscribe |