Re: [SQL] pg_hba.conf

2000-09-04 Thread Craig May


I've renamed the file to "pg_hba.conf".  It's owner and groug are now postgres.
 The file is located in /usr/lib/pgsql/.  I'm still receiving the same error.



On Mon, 04 Sep 2000 07:47:08 Christopher Sawtell wrote:
> On Tue, 05 Sep 2000, Craig May wrote:
> > Hi,
> > 
> > I'm recieving an error "No pg_hba.conf entry for host XXX, usr XXX,
database
> > XXX."  I've modified the pg_hba.conf.sample file to allow all access,
however
> > still getting the same message.  Any suggestions?
> you have copied pg_hba.conf.sample to pg_hba.conf havn't you?
> 
> If that dosn't work check the permissions. The file has to readable by the
> pgsql server/backend.
> 
> -- 
> Sincerely etc.,
> 
>  NAME   Christopher Sawtell
>  CELL PHONE 021 257 4451
>  ICQ UIN45863470
>  EMAIL  csawtell @ xtra . co . nz
>  CNOTES ftp://ftp.funet.fi/pub/languages/C/tutorials/sawtell_C.tar.gz
> 
>  -->> Please refrain from using HTML or WORD attachments in e-mails to me
<<--




Re: [SQL] pg_hba.conf

2000-09-04 Thread Christopher Sawtell

On Tue, 05 Sep 2000, Craig May wrote:
> Hi,
> 
> I'm recieving an error "No pg_hba.conf entry for host XXX, usr XXX, database
> XXX."  I've modified the pg_hba.conf.sample file to allow all access, however
> still getting the same message.  Any suggestions?
you have copied pg_hba.conf.sample to pg_hba.conf havn't you?

If that dosn't work check the permissions. The file has to readable by the
pgsql server/backend.

-- 
Sincerely etc.,

 NAME   Christopher Sawtell
 CELL PHONE 021 257 4451
 ICQ UIN45863470
 EMAIL  csawtell @ xtra . co . nz
 CNOTES ftp://ftp.funet.fi/pub/languages/C/tutorials/sawtell_C.tar.gz

 -->> Please refrain from using HTML or WORD attachments in e-mails to me <<--




Re: [SQL] pg_hba.conf

2000-09-04 Thread drfrog

Craig May wrote:
> 
> I've renamed the file to "pg_hba.conf".  It's owner and groug are now postgres.
>  The file is located in /usr/lib/pgsql/.  I'm still receiving the same error.
> 

if you are running redhat 6.X as i suspect

you should place that file in /var/lib/pgsql

not /usr/lib/pgsql

check /etc/rc.d/init.d/postgresql

to make sure {if you are under redhat}



Re: [SQL] pg_hba.conf

2000-09-04 Thread Jan Wieck

Craig May wrote:

> I've renamed the file to "pg_hba.conf".  It's owner and groug are now postgres.
>  The file is located in /usr/lib/pgsql/.  I'm still receiving the same error.

Network  setup?  Contents  of pg_hba.conf? How should someone
tell you what's wrong with the information you gave  us  that
far?


Jan

--

#==#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.  #
#== [EMAIL PROTECTED] #





[SQL] drop sequence in transaction

2000-09-04 Thread Ice Planet

Hello

I have a litle problem with sequences.
I use drop sequence in transaction, is this possible?

If yes, then i have done:
1. begin
2. get some data
3. drop sequence s_acc
4. create sequence s_acc...
5. rollback

And after this the database responds like this:

test=# \d s_acc
Sequence "s_acc"
   Attribute   |  Type
---+-
 sequence_name | name
 last_value| integer
 increment_by  | integer
 max_value | integer
 min_value | integer
 cache_value   | integer
 is_cycled | char
 is_called | char

test=# select * from s_acc;
NOTICE:  mdopen: couldn't open s_acc: No such file or directory
NOTICE:  mdopen: couldn't open s_acc: No such file or directory
NOTICE:  mdopen: couldn't open s_acc: No such file or directory
NOTICE:  mdopen: couldn't open s_acc: No such file or directory
NOTICE:  mdopen: couldn't open s_acc: No such file or directory
ERROR:  cannot open relation s_acc
test=# select last_value from s_acc;
NOTICE:  mdopen: couldn't open s_acc: No such file or directory
NOTICE:  mdopen: couldn't open s_acc: No such file or directory
NOTICE:  mdopen: couldn't open s_acc: No such file or directory
NOTICE:  mdopen: couldn't open s_acc: No such file or directory
ERROR:  cannot open relation s_acc
test=#

I realy don't know what means this?

Thank's for help...

   Best regards
  Ice Planet

e-mail: [EMAIL PROTECTED]
ICQ#: 67765483





Re: [SQL] Order by in stored functions

2000-09-04 Thread Tom Lane

Andreas Tille <[EMAIL PROTECTED]> writes:
> I've got the following error message:
> ERROR: function declared to return varchar returns multiple values in
> final retrieve

This is a bug that has already been fixed in current sources: the check
that makes sure your select produces only one varchar column is
mistakenly counting the hidden IdSort column that's needed to sort by.

I don't know of any good workaround in 7.0, short of patching the
erroneous code.  Have you thought about using a view, rather than a
function returning set?

regards, tom lane



Re: [SQL] pg_hba.conf

2000-09-04 Thread Craig May

Ok,

Here are all the details:

Redhat 6.1
pgsql 7.0
Firewall open on port 3456

pg_hba.conf contains the following line

host all0.0.0.0   0.0.0.0   trust

and is now located in both:

/usr/lib/pgsql/ and  /var/lib/pgsql/

This file is owned by "postgres".

The error message is as follows:

"No pg_pba.conf entry for host 203.36.78.179, usr root, database reflexions"

I'm using the postgresql jdbc driver.   The machines are on the same subnet,
however, there are no additional relations between the machines.  The connection
is successful from localhost.  Finally, I have restarted the postgresql service
between every change.

Regards.
Craig May

Enth Dimension
http://www.enthdimension.com.au


On Mon, 04 Sep 2000 10:19:35 Jan Wieck wrote:
> Craig May wrote:
> 
> > I've renamed the file to "pg_hba.conf".  It's owner and groug are now
postgres.
> >  The file is located in /usr/lib/pgsql/.  I'm still receiving the same
error.
> 
> Network  setup?  Contents  of pg_hba.conf? How should someone
> tell you what's wrong with the information you gave  us  that
> far?
> 
> 
> Jan
> 
> --
> 
> #==#
> # It's easier to get forgiveness for being wrong than for being right. #
> # Let's break this rule - forgive me.  #
> #== [EMAIL PROTECTED] #
> 




Re: [SQL] pg_hba.conf

2000-09-04 Thread Craig May

Found it!

The file should be located in /var/lib/pgsql/data/

Thanks for your help all =)

Craig May


Enth Dimension
http://www.enthdimension.com.au


On Tue, 05 Sep 2000 11:11:25 Craig May wrote:
> Ok,
> 
> Here are all the details:
> 
> Redhat 6.1
> pgsql 7.0
> Firewall open on port 3456
> 
> pg_hba.conf contains the following line
> 
> host all0.0.0.0   0.0.0.0   trust
> 
> and is now located in both:
> 
> /usr/lib/pgsql/ and  /var/lib/pgsql/
> 
> This file is owned by "postgres".
> 
> The error message is as follows:
> 
> "No pg_pba.conf entry for host 203.36.78.179, usr root, database reflexions"
> 
> I'm using the postgresql jdbc driver.   The machines are on the same subnet,
> however, there are no additional relations between the machines.  The
connection
> is successful from localhost.  Finally, I have restarted the postgresql
service
> between every change.
> 
> Regards.
> Craig May
> 
> Enth Dimension
> http://www.enthdimension.com.au
> 
> 
> On Mon, 04 Sep 2000 10:19:35 Jan Wieck wrote:
> > Craig May wrote:
> > 
> > > I've renamed the file to "pg_hba.conf".  It's owner and groug are now
> postgres.
> > >  The file is located in /usr/lib/pgsql/.  I'm still receiving the same
> error.
> > 
> > Network  setup?  Contents  of pg_hba.conf? How should someone
> > tell you what's wrong with the information you gave  us  that
> > far?
> > 
> > 
> > Jan
> > 
> > --
> > 
> > #==#
> > # It's easier to get forgiveness for being wrong than for being right. #
> > # Let's break this rule - forgive me.  #
> > #== [EMAIL PROTECTED] #
> > 




[SQL] Re: Order by in stored functions

2000-09-04 Thread Andreas Tille

On Mon, 4 Sep 2000, Tom Lane wrote:

> This is a bug that has already been fixed in current sources: the check
> that makes sure your select produces only one varchar column is
> mistakenly counting the hidden IdSort column that's needed to sort by.
Is there any patch against 7.0.2 sources which might help me (or the
Debian package maintainer out?
 
> I don't know of any good workaround in 7.0, short of patching the
> erroneous code.  Have you thought about using a view, rather than a
> function returning set?
I could try that.

Is there any general advise for more or less beginners like me regarding
when to use views and when to use functions?

Kind regards

 Andreas.