Re: [SQL] psql: FATAL: Ident authentication failed for user "postgres"

2008-09-08 Thread Filip Rembiałkowski
2008/9/8 VG <[EMAIL PROTECTED]>:
> Hi,
>
> I have installed postgresql-serve using yum
> hba.conf group and owner were postgres then i changed it to root.
>
> when i type psql -U postgres command ( as root  user) I get:
>
> psql: FATAL:  Ident authentication failed for user "postgres"
>

read http://www.depesz.com/index.php/2007/10/04/ident/
what's in pg_hba.conf?



> My file permission are:
> drwx-- 5 postgres postgres  4096 2008-09-06 00:36 base
> drwx-- 2 postgres postgres  4096 2008-09-08 21:44 global
> drwx-- 2 postgres postgres  4096 2008-09-06 00:36 pg_clog
> -rw-r--r-- 1 postgres postgres  3200 2008-09-08 21:35 pg_hba.conf
> -rw--- 1 postgres postgres  1460 2008-09-06 00:36 pg_ident.conf
> drwx-- 2 postgres postgres  4096 2008-09-08 15:52 pg_log
> drwx-- 4 postgres postgres  4096 2008-09-06 00:36 pg_multixact
> drwx-- 2 postgres postgres  4096 2008-09-06 00:36 pg_subtrans
> drwx-- 2 postgres postgres  4096 2008-09-06 00:36 pg_tblspc
> drwx-- 2 postgres postgres  4096 2008-09-06 00:36 pg_twophase
> -rw--- 1 postgres postgres 4 2008-09-06 00:36 PG_VERSION
> drwx-- 3 postgres postgres  4096 2008-09-06 00:36 pg_xlog
> -rw--- 1 postgres postgres 15336 2008-09-06 00:36 postgresql.conf
> -rw--- 1 postgres postgres49 2008-09-08 21:44 postmaster.opts
> -rw--- 1 postgres postgres46 2008-09-08 21:44 postmaster.pid
>
> How could i achieve this..
> Regards,
> Vikas
>
>
>



-- 
Filip Rembiałkowski

-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


Re: [SQL] psql: FATAL: Ident authentication failed for user "postgres"

2008-09-08 Thread Milen A. Radev
VG написа:
> Hi,
> 
> I have installed postgresql-serve using yum
> hba.conf group and owner were postgres then i changed it to root.

Why?

> 
> when i type psql -U postgres command ( as root  user) I get:
> 
> psql: FATAL:  Ident authentication failed for user "postgres"


Most probably the default pg_hba.conf includes the following line:
local   all postgres  ident

Which means that you could login with the DB user "postgres" only if you
are logged in already as the system user "postgres". So "su - postgres"
before using psql should do the trick.

Please read "Chapter 21. Client Authentication"
(http://www.postgresql.org/docs/current/static/client-authentication.html)
for details.


-- 
Milen A. Radev


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


[SQL] problem with pg_stat_activity view

2008-09-08 Thread Sofer, Yuval
Hello,

 

postgres version:  8.2.0.4

platform windows: server 2008

 

I check connections using: 

 

SELECT pg_stat_get_backend_idset()

 

Now, I take the output and try to get the ip addresses using 

 

select pg_stat_get_backend_client_addr();

 

but for a local connection (simple login using psql), I get the next
error: 

 

ERROR:  invalid input syntax for type inet:
"fe80::104d:416e:a8dc:c02e%12"

SQL state: 22P02

 

The same error occurs for simple "select * pg_stat_activity" (of course,
as it is based on the former function)

 

I noticed that for netstat -r -n, I got the next line (among the
others):

 

12266 fe80::104d:416e:a8dc:c02e/128

 

May the last 8 was removed and therefore the ip became illegal ? 

 

Need your help 

 

Thanks, 

 

Yuval Sofer
BMC Software
CTM&D Business Unit

DBA Team
972-52-4286-282
[EMAIL PROTECTED]

 



Re: [SQL] problem with pg_stat_activity view

2008-09-08 Thread Tom Lane
"Sofer, Yuval" <[EMAIL PROTECTED]> writes:
> postgres version:  8.2.0.4

> ERROR:  invalid input syntax for type inet:
> "fe80::104d:416e:a8dc:c02e%12"

This is fixed in 8.2.5 and later.

regards, tom lane

-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


Re: [SQL] psql: FATAL: Ident authentication failed for user "postgres"

2008-09-08 Thread Devrim GÜNDÜZ
On Mon, 2008-09-08 at 15:39 +0530, VG wrote:
> hba.conf group and owner were postgres then i changed it to root.
> 
> when i type psql -U postgres command ( as root  user) I get:
> 
> psql: FATAL:  Ident authentication failed for user "postgres"

First, revert the owner/group change.

Then, su - postgresand then run psql.

Or:

Edit pg_hba.conf, and write 

trust

instead of "ident sameuser" -- then reload PostgreSQL 

As root: service postgresql reload
or as postgres user: pg_ctl reload

Ownership of pg_hba.conf has nothing to do with the authentication.

Regards,

-- 
Devrim GÜNDÜZ, RHCE
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
   http://www.gunduz.org


signature.asc
Description: This is a digitally signed message part


[SQL] psql: FATAL: Ident authentication failed for user "postgres"

2008-09-08 Thread VG
Hi,

I have installed postgresql-serve using yum
hba.conf group and owner were postgres then i changed it to root.

when i type psql -U postgres command ( as root  user) I get:

psql: FATAL:  Ident authentication failed for user "postgres"

My file permission are:
drwx-- 5 postgres postgres  4096 2008-09-06 00:36 base
drwx-- 2 postgres postgres  4096 2008-09-08 21:44 global
drwx-- 2 postgres postgres  4096 2008-09-06 00:36 pg_clog
-rw-r--r-- 1 postgres postgres  3200 2008-09-08 21:35 pg_hba.conf
-rw--- 1 postgres postgres  1460 2008-09-06 00:36 pg_ident.conf
drwx-- 2 postgres postgres  4096 2008-09-08 15:52 pg_log
drwx-- 4 postgres postgres  4096 2008-09-06 00:36 pg_multixact
drwx-- 2 postgres postgres  4096 2008-09-06 00:36 pg_subtrans
drwx-- 2 postgres postgres  4096 2008-09-06 00:36 pg_tblspc
drwx-- 2 postgres postgres  4096 2008-09-06 00:36 pg_twophase
-rw--- 1 postgres postgres 4 2008-09-06 00:36 PG_VERSION
drwx-- 3 postgres postgres  4096 2008-09-06 00:36 pg_xlog
-rw--- 1 postgres postgres 15336 2008-09-06 00:36 postgresql.conf
-rw--- 1 postgres postgres49 2008-09-08 21:44 postmaster.opts
-rw--- 1 postgres postgres46 2008-09-08 21:44 postmaster.pid

How could i achieve this..
Regards,
Vikas


[SQL] PL/pgSQL function syntax question?

2008-09-08 Thread Ruben Gouveia
i get the following error when i try and create the following function:

Basically, i am trying to have two different dates compared and only the
most recent returned to me.  This seems pretty straight forward, what I am
doing wrong here?

create or replace function fcn_pick_date(v_dt date)
returns date as $$
  DECLARE
  v_dt date;
  BEGIN
for v_record in select last_periodic, last_boot
from mediaportal
loop
if v_dt >= v_record.last_boot then
   v_dt := v_record.last_periodic;
else
v_dt := v_record.last_boot;
end if;
end loop;
return (v_dt);
END;
$$ LANGUAGE 'plpgsql';


ERROR:  loop variable of loop over rows must be record or row variable at or
near "loop" at character 195

** Error **

ERROR: loop variable of loop over rows must be record or row variable at or
near "loop"
SQL state: 42601
Character: 195


Re: [SQL] PL/pgSQL function syntax question?

2008-09-08 Thread Adrian Klaver

-- Original message --
From: "Ruben Gouveia" <[EMAIL PROTECTED]>
> i get the following error when i try and create the following function:
> 
> Basically, i am trying to have two different dates compared and only the
> most recent returned to me.  This seems pretty straight forward, what I am
> doing wrong here?
> 
> create or replace function fcn_pick_date(v_dt date)
> returns date as $$
>   DECLARE
>   v_dt date;
>   BEGIN
> for v_record in select last_periodic, last_boot
> from mediaportal
> loop
> if v_dt >= v_record.last_boot then
>v_dt := v_record.last_periodic;
> else
> v_dt := v_record.last_boot;
> end if;
> end loop;
> return (v_dt);
> END;
> $$ LANGUAGE 'plpgsql';
> 
> 
> ERROR:  loop variable of loop over rows must be record or row variable at or
> near "loop" at character 195
> 
> ** Error **
> 
> ERROR: loop variable of loop over rows must be record or row variable at or
> near "loop"
> SQL state: 42601
> Character: 195

You need to DECLARE v_record as a RECORD variable.
v_record RECORD;

--
Adrian Klaver
[EMAIL PROTECTED]

 

--- Begin Message ---
i get the following error when i try and create the following function:Basically, i am trying to have two different dates compared and only the most recent returned to me.  This seems pretty straight forward, what I am doing wrong here?
create or replace function fcn_pick_date(v_dt date) returns date as $$    DECLARE  v_dt date;   BEGIN    for v_record in select last_periodic, last_boot
    from mediaportal    loop    if v_dt >= v_record.last_boot then   v_dt := v_record.last_periodic;    else    v_dt := v_record.last_boot;    end if;    end loop;    return (v_dt);
END;$$ LANGUAGE 'plpgsql';ERROR:  loop variable of loop over rows must be record or row variable at or near "loop" at character 195** Error **
ERROR: loop variable of loop over rows must be record or row variable at or near "loop"SQL state: 42601Character: 195
--- End Message ---

-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


Re: [SQL] PL/pgSQL function syntax question?

2008-09-08 Thread imad
I see v_dt is not initialized before comparison, there should be some value
in it before it is useful.

--Imad


On Tue, Sep 9, 2008 at 8:47 AM, Adrian Klaver <[EMAIL PROTECTED]> wrote:

>
> -- Original message --
> From: "Ruben Gouveia" <[EMAIL PROTECTED]>
> > i get the following error when i try and create the following function:
> >
> > Basically, i am trying to have two different dates compared and only the
> > most recent returned to me.  This seems pretty straight forward, what I
> am
> > doing wrong here?
> >
> > create or replace function fcn_pick_date(v_dt date)
> > returns date as $$
> >   DECLARE
> >   v_dt date;
> >   BEGIN
> > for v_record in select last_periodic, last_boot
> > from mediaportal
> > loop
> > if v_dt >= v_record.last_boot then
> >v_dt := v_record.last_periodic;
> > else
> > v_dt := v_record.last_boot;
> > end if;
> > end loop;
> > return (v_dt);
> > END;
> > $$ LANGUAGE 'plpgsql';
> >
> >
> > ERROR:  loop variable of loop over rows must be record or row variable at
> or
> > near "loop" at character 195
> >
> > ** Error **
> >
> > ERROR: loop variable of loop over rows must be record or row variable at
> or
> > near "loop"
> > SQL state: 42601
> > Character: 195
>
> You need to DECLARE v_record as a RECORD variable.
> v_record RECORD;
>
> --
> Adrian Klaver
> [EMAIL PROTECTED]
>
>
>
>
>
> -- Forwarded message --
> From: "Ruben Gouveia" <[EMAIL PROTECTED]>
> To: pgsql-sql 
> Date: Mon, 8 Sep 2008 21:41:14 +
> Subject: [SQL] PL/pgSQL function syntax question?
> i get the following error when i try and create the following function:
>
> Basically, i am trying to have two different dates compared and only the
> most recent returned to me.  This seems pretty straight forward, what I am
> doing wrong here?
>
> create or replace function fcn_pick_date(v_dt date)
> returns date as $$
>   DECLARE
>   v_dt date;
>   BEGIN
> for v_record in select last_periodic, last_boot
> from mediaportal
> loop
> if v_dt >= v_record.last_boot then
>v_dt := v_record.last_periodic;
> else
> v_dt := v_record.last_boot;
> end if;
> end loop;
> return (v_dt);
> END;
> $$ LANGUAGE 'plpgsql';
>
>
> ERROR:  loop variable of loop over rows must be record or row variable at
> or near "loop" at character 195
>
> ** Error **
>
> ERROR: loop variable of loop over rows must be record or row variable at or
> near "loop"
> SQL state: 42601
> Character: 195
>
>
>
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>
>


Marilah cari Duit Rm10,Rm100,RM1000.00..

2008-09-08 Thread ehsan08
Marilah cari Duit Rm10,Rm100,RM1000.00..
Ini bukan pelaburan skim cepat kaya.
Namun dengan hanya RM10 sahaja,
peserta boleh menjana dana sehingga RM 1,000,000
yang bergantung kepada usaha dan kesungguhan
dengan menggunakan sistem 5 peringkat penajaan yang telah disediakan.

lihat dulu link di bawah:-

http://tinyurl.com/6bcxpk

selamat berjaya dan berusaha...

Setiap peserta baru tajaan peringkat ke-5
akan memberi sumbangan terus ke akaun bank anda
tanpa melalui pihak admin.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "CARI 
DUIT modal cuma 6.20..hasil komisyen RM 2000 seminggu" group.
To post to this group, send email to 
MOdal-rm620-pulangan-komisyen-RM-2000-sebulan@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com.my/group/MOdal-rm620-pulangan-komisyen-RM-2000-sebulan?hl=en
-~--~~~~--~--oogle_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_channel = "8427791634";
google_color_border = "FF";
google_color_bg = "FF";
google_color_link = "006792";
google_color_url = "006792";
google_color_text = "00";
//-->








[SQL] a simple transform
Karl Grossner
 


 






  
  





Reply via email to