Re: [HACKERS] \d type queries - why not views in system catalog?!?

2003-01-14 Thread Dave Page


 -Original Message-
 From: Robert Treat [mailto:[EMAIL PROTECTED]] 
 Sent: 13 January 2003 22:01
 To: Greg Copeland
 Cc: Dave Page; [EMAIL PROTECTED]; PostgresSQLHackers Mailing List
 Subject: Re: [HACKERS] \d type queries - why not views in 
 system catalog?!?
 
 
 You have to do it in functions because some of the \ commands 
 use multiple queries and logic inside the C code. 

pgAdmin lists far more comprehensive data the psql and does it from
single queries 95% of the time. I'm sure someone more expert in SQL than
me could get pretty much all the other 5% sorted...

Regards, Dave.

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [HACKERS] \d type queries - why not views in system catalog?!?

2003-01-14 Thread Hannu Krosing
On Tue, 2003-01-14 at 01:39, Christopher Kings-Lynne wrote:
 What about querying the information_schema?

Will information_schema be strictly SQL99 or will it also have
PostgreSQL specific views/fields ?

-- 
Hannu Krosing [EMAIL PROTECTED]

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] [GENERAL] Server error and deadlocks

2003-01-14 Thread Tom Lane
Orr, Steve [EMAIL PROTECTED] writes:
 I suspect table locks but are there any database level tracing
 tools to show the SQL? Will the trace_locks and debug_deadlocks parameters
 help and how do I use them?

I do not think those will help you; they are low-level debugging aids
and are probably far too verbose to be useful for tracing an occasional
application problem.  Besides which, they're not even compiled in by
default.

It seems to me that it would be appropriate for DeadLockCheck to emit
more information about the problem it's found than just there's a
deadlock.  How do people feel about reporting the detected cycle as
a series of NOTICE messages?  It would look pretty similar to the
pg_locks view:

NOTICE:  Proc pid waits for lockmode on rel db; blocked by pid
NOTICE:  Proc pid waits for lockmode on rel db; blocked by pid
NOTICE:  Proc pid waits for lockmode on rel db; blocked by pid
ERROR: Deadlock detected

If that seems acceptable, I could code it up in short order.  While I
wouldn't want to apply it to the REL7_3_STABLE branch, I see no reason
Steve wouldn't be able to use the patch locally to identify his problem.

regards, tom lane

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] \d type queries - why not views in system catalog?!?

2003-01-14 Thread Tom Lane
Hannu Krosing [EMAIL PROTECTED] writes:
 Will information_schema be strictly SQL99 or will it also have
 PostgreSQL specific views/fields ?

If it's not strictly conformant to the spec, I see no value in it at
all.  We already have plenty of ability to query the catalogs via
non-standard queries.

regards, tom lane

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [HACKERS] \d type queries - why not views in system catalog?!?

2003-01-14 Thread Hannu Krosing
On Tue, 2003-01-14 at 15:47, Tom Lane wrote:
 Hannu Krosing [EMAIL PROTECTED] writes:
  Will information_schema be strictly SQL99 or will it also have
  PostgreSQL specific views/fields ?
 
 If it's not strictly conformant to the spec, I see no value in it at
 all. 

I mean that it could have at least extra *views* for postgresql specific
things. It could also have extra *fields* on standard views, but that
might break some apps. I see no way how having extra views can break
apps.

  We already have plenty of ability to query the catalogs via
 non-standard queries.

But would it not be nice to have some standard ones, so that each and
every DB management app does not need to invent its own ?

I agree that this could be done as a project at gborg rather than  in
information_schema, but it would still be good to have one standard
place for examples at least. And the only way to keep the examples
up-to-date is by using them in live projects.

-- 
Hannu Krosing [EMAIL PROTECTED]

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] copying perms to another user

2003-01-14 Thread Ross J. Reedstrom
On Tue, Jan 14, 2003 at 12:23:59PM +0800, Christopher Kings-Lynne wrote:
  Christopher Kings-Lynne [EMAIL PROTECTED] writes:
   No, I mean that we don't drop the user.  You go:
   ALTER USER chriskl COPY PERMISSIONS FROM blah;
 
  That seems cleaner to me than the DROP thingy.
 
  You could only easily implement this in the current database --- but
  since it's not a DROP, one could repeat it in each database as needed.
 
 Could someone perhaps add it to TODO then (so I don't forget about it)?  I
 can't promise that I can implement it...

In this scenario, 'blah' is the user who will eventually be dropped, and
chriskl is taking over ownership of his 'stuff' right? How about doing it
the other way:

ALTER USER blah COPY PERMISSIONS TO chriskl;

Hmm, in fact, I can imagine uses for both forms: creating a 'template'
user who you COPY PERMISSIONS FROM when creating a new user of that type,
who will then be customized, so you can't use GROUPs. Hmm, what about
GROUP membership? Those get copied as well?

Ross

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] [GENERAL] Server error and deadlocks

2003-01-14 Thread Andrew Sullivan
On Tue, Jan 14, 2003 at 10:31:14AM -0500, Tom Lane wrote:
 deadlock.  How do people feel about reporting the detected cycle as
 a series of NOTICE messages?  It would look pretty similar to the

Yes, please!!  

A

-- 

Andrew Sullivan 204-4141 Yonge Street
Liberty RMS   Toronto, Ontario Canada
[EMAIL PROTECTED]  M2P 2A8
 +1 416 646 3304 x110


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] copying perms to another user

2003-01-14 Thread Peter Eisentraut
Christopher Kings-Lynne writes:

 Often I need to remove a user and cede their permissions to someone else.

If this happens to you a lot, the solution is to implement roles, grant
privileges to a role, grant the role to a user, and when you remove the
user you grant the role to someone else.

-- 
Peter Eisentraut   [EMAIL PROTECTED]


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])



[HACKERS] 7.3.1 on linux

2003-01-14 Thread John Liu

createlang plpgsql template1
ERROR:  stat failed on file '$libdir/plpgsql': No such file or directory
createlang: language installation failed

is the above error normal in 7.3.1 on linux?

thanks.

johnl

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



[HACKERS] CVS-TIP

2003-01-14 Thread Rod Taylor
It appears that FreeBSD doesn't approve of the use of inet.h in this
fashion.  Probably related to the IPV6 changes.

On FreeBSD 4.7:

bash-2.05b$ make install  /dev/null
In file included from pqcomm.c:75:
/usr/include/arpa/inet.h:89: warning: parameter has incomplete type
/usr/include/arpa/inet.h:92: warning: parameter has incomplete type
/usr/include/arpa/inet.h:96: warning: parameter has incomplete type
-- 
Rod Taylor [EMAIL PROTECTED]

PGP Key: http://www.rbt.ca/rbtpub.asc



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


Re: [HACKERS] copying perms to another user

2003-01-14 Thread Tom Lane
Ross J. Reedstrom [EMAIL PROTECTED] writes:
 On Tue, Jan 14, 2003 at 12:23:59PM +0800, Christopher Kings-Lynne wrote:
 Christopher Kings-Lynne [EMAIL PROTECTED] writes:
 No, I mean that we don't drop the user.  You go:
 ALTER USER chriskl COPY PERMISSIONS FROM blah;

 In this scenario, 'blah' is the user who will eventually be dropped, and
 chriskl is taking over ownership of his 'stuff' right? How about doing it
 the other way:
 ALTER USER blah COPY PERMISSIONS TO chriskl;

That seems a bit bizarre to me.  The user whose permissions are actually
being altered by this command is chriskl, not blah, so ISTM chriskl is
the name that should be specified as being ALTERed.  In other words I
like FROM, not TO.

But: nearby, Peter E. complains that this is a poor substitute for
implementing SQL-spec roles.  He's got a point --- especially since
roles could be made installation-wide, and thus they'd get around the
problem that ALTER USER COPY couldn't realistically do anything about
permissions in other databases.  GRANT ROLE foo TO USER bar (or whatever
the spec syntax is) would be an installation-wide change and so would
indirectly grant any privileges the role has in other databases.

While I haven't thought about it very hard, it seems to me that a role
might be equivalent or nearly so to a group.  If so, we might be able
to support roles with little more than some syntactic-sugar work ...

regards, tom lane

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

http://archives.postgresql.org



Re: [HACKERS] copying perms to another user

2003-01-14 Thread Rod Taylor

 While I haven't thought about it very hard, it seems to me that a role
 might be equivalent or nearly so to a group.  If so, we might be able
 to support roles with little more than some syntactic-sugar work ...

A few other changes, like allowing ownership of an object to be a group
(role) rather than strictly a user.

-- 
Rod Taylor [EMAIL PROTECTED]

PGP Key: http://www.rbt.ca/rbtpub.asc



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


Re: [HACKERS] copying perms to another user

2003-01-14 Thread Mike Mascari
From: Rod Taylor [EMAIL PROTECTED]

 While I haven't thought about it very hard, it seems to me that a role
 might be equivalent or nearly so to a group.  If so, we might be able
 to support roles with little more than some syntactic-sugar work ...

A few other changes, like allowing ownership of an object to be a group
(role) rather than strictly a user.

Also, at least in Oracle, one can grant ROLEs to other ROLEs. I don't know if that is 
what the SQL standard says though:

GRANT role1 TO role2;

Mike Mascari
[EMAIL PROTECTED]



---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [HACKERS] CVS-TIP

2003-01-14 Thread Bruce Momjian

Any idea what it needs?  What is in inet.h at that line, and where is it
defined?  I see sys/socket.h included.  Does sys/types.h help?


---

Rod Taylor wrote:
-- Start of PGP signed section.
 It appears that FreeBSD doesn't approve of the use of inet.h in this
 fashion.  Probably related to the IPV6 changes.
 
 On FreeBSD 4.7:
 
 bash-2.05b$ make install  /dev/null
 In file included from pqcomm.c:75:
 /usr/include/arpa/inet.h:89: warning: parameter has incomplete type
 /usr/include/arpa/inet.h:92: warning: parameter has incomplete type
 /usr/include/arpa/inet.h:96: warning: parameter has incomplete type
 -- 
 Rod Taylor [EMAIL PROTECTED]
 
 PGP Key: http://www.rbt.ca/rbtpub.asc
-- End of PGP section, PGP failed!

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])



[HACKERS] Anyone have a fresh Solaris 8 SPARC system to create a PG 7.3.1 packageon?

2003-01-14 Thread Justin Clift
Hi guys,

Have created a Solaris 8 Intel package for PostgreSQL 7.3.1, but don't 
have any SPARC boxes here any more.

Does anyone have a SPARC box handy that would be available for compiling 
PostgreSQL 7.3.1 on?  It would need to be Solaris 8 (or maybe 9), and 
have things like gcc 2.95.x and similar tools installed, as well as be 
patched with the latest recommended Solaris patches.

Might be a huge ask, but am figuring it to be worth at least trying.

:-)

Regards and best wishes,

Justin Clift

--
My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there.
- Indira Gandhi


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html


Re: [HACKERS] CVS-TIP

2003-01-14 Thread Rod Taylor
On Tue, 2003-01-14 at 17:11, Bruce Momjian wrote:
 Any idea what it needs?  What is in inet.h at that line, and where is it
 defined?  I see sys/socket.h included.  Does sys/types.h help?
 
 
 ---
 
 Rod Taylor wrote:
 -- Start of PGP signed section.
  It appears that FreeBSD doesn't approve of the use of inet.h in this
  fashion.  Probably related to the IPV6 changes.
  
  On FreeBSD 4.7:
  
  bash-2.05b$ make install  /dev/null
  In file included from pqcomm.c:75:
  /usr/include/arpa/inet.h:89: warning: parameter has incomplete type
  /usr/include/arpa/inet.h:92: warning: parameter has incomplete type
  /usr/include/arpa/inet.h:96: warning: parameter has incomplete type
  -- 
  Rod Taylor [EMAIL PROTECTED]
  
  PGP Key: http://www.rbt.ca/rbtpub.asc
 -- End of PGP section, PGP failed!
-- 
Rod Taylor [EMAIL PROTECTED]

PGP Key: http://www.rbt.ca/rbtpub.asc

/*
 * Copyright (c) 1983, 1993
 *	The Regents of the University of California.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *notice, this list of conditions and the following disclaimer in the
 *documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *must display the following acknowledgement:
 *	This product includes software developed by the University of
 *	California, Berkeley and its contributors.
 * 4. Neither the name of the University nor the names of its contributors
 *may be used to endorse or promote products derived from this software
 *without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * -
 * Portions Copyright (c) 1993 by Digital Equipment Corporation.
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies, and that
 * the name of Digital Equipment Corporation not be used in advertising or
 * publicity pertaining to distribution of the document or software without
 * specific, written prior permission.
 * 
 * THE SOFTWARE IS PROVIDED AS IS AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
 * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
 * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
 * SOFTWARE.
 */

/*
 *	@(#)inet.h	8.1 (Berkeley) 6/2/93
 *	From: Id: inet.h,v 8.5 1997/01/29 08:48:09 vixie Exp $
 * $FreeBSD: src/include/arpa/inet.h,v 1.11.2.1 2001/04/21 14:53:03 ume Exp $
 */

#ifndef _ARPA_INET_H_
#define	_ARPA_INET_H_

/* External definitions for functions in inet(3), addr2ascii(3) */

#include sys/types.h
#include sys/cdefs.h

struct in_addr;

/* XXX all new diversions!! argh!! */
#define	inet_addr	__inet_addr
#define	inet_aton	__inet_aton
#define	inet_lnaof	__inet_lnaof
#define	inet_makeaddr	__inet_makeaddr
#define	inet_neta	__inet_neta
#define	inet_netof	__inet_netof
#define	inet_network	__inet_network
#define	inet_net_ntop	__inet_net_ntop
#define	inet_net_pton	__inet_net_pton
#define	inet_ntoa	__inet_ntoa
#define	inet_pton	__inet_pton
#define	inet_ntop	__inet_ntop
#define	inet_nsap_addr	__inet_nsap_addr
#define	inet_nsap_ntoa	__inet_nsap_ntoa

__BEGIN_DECLS
int		 ascii2addr __P((int, const char *, void *));
char		*addr2ascii __P((int, const void *, int, char *));
in_addr_t	 inet_addr __P((const char *));
int		 inet_aton __P((const char *, struct in_addr *));
in_addr_t	 inet_lnaof __P((struct in_addr));
struct in_addr	 inet_makeaddr __P((in_addr_t, in_addr_t));

Re: [HACKERS] CVS-TIP

2003-01-14 Thread Bruce Momjian

Seems it was the removal of an include in this commit:

revision 1.145
date: 2003/01/06 09:58:23;  author: petere;  state: Exp;  lines: +1 -2
Fix for systems that don't have INET_ADDRSTRLEN.

netinet/in.h re-added to include list.

---

Rod Taylor wrote:
-- Start of PGP signed section.
 Thats the first time I've managed to add the attachment and forget the
 message.
 
 inet.h attached in previous email.
 
 
 On Tue, 2003-01-14 at 17:11, Bruce Momjian wrote:
  Any idea what it needs?  What is in inet.h at that line, and where is it
  defined?  I see sys/socket.h included.  Does sys/types.h help?
  
  
  ---
  
  Rod Taylor wrote:
  -- Start of PGP signed section.
   It appears that FreeBSD doesn't approve of the use of inet.h in this
   fashion.  Probably related to the IPV6 changes.
   
   On FreeBSD 4.7:
   
   bash-2.05b$ make install  /dev/null
   In file included from pqcomm.c:75:
   /usr/include/arpa/inet.h:89: warning: parameter has incomplete type
   /usr/include/arpa/inet.h:92: warning: parameter has incomplete type
   /usr/include/arpa/inet.h:96: warning: parameter has incomplete type
   -- 
   Rod Taylor [EMAIL PROTECTED]
   
   PGP Key: http://www.rbt.ca/rbtpub.asc
  -- End of PGP section, PGP failed!
 -- 
 Rod Taylor [EMAIL PROTECTED]
 
 PGP Key: http://www.rbt.ca/rbtpub.asc
-- End of PGP section, PGP failed!

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



[HACKERS] Anyone want to get involved in writing the the driver to connectStar/OpenOffice and PostgreSQL?

2003-01-14 Thread Justin Clift
Hi guys,

Have been discussing what it would take to write an SDBC driver for 
connecting StarOffice/OpenOffice to PostgreSQL with Frank Schönheit, a 
senior member of the Sun StarOffice/OpenOffice DBA team, and a few 
senior members of the OpenOffice project.

SDBC is based largely on ODBC, so it might be more a matter of porting 
the existing ODBC stuff rather than a complete re-write.  Frank reckons 
it would take about 2 man weeks of total effort if needed to be written 
from scratch, so it's probably not going to be too hard for an 
experienced C++  PostgreSQL coder.

Would anyone be interested in getting involved in doing this?  If 
anyone's up for it, the Sun StarOffice/OpenOffice DBA team in Hamburg 
Germany will be available for support etc.

Getting an SDBC driver written to connect Star/OpenOffice and PostgreSQL 
is very good step towards integrating PostgreSQL support further into 
Star/OpenOffice.

:-)

Regards and best wishes,

Justin Clift

--
My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there.
- Indira Gandhi


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


[HACKERS] UNION result

2003-01-14 Thread Tatsuo Ishii
Does anybody know:

select 1.0 union select 1;
or
select 1 union select 1.0;

should return 1 or 1.0?

I see below on my Linux box:

test=# select 1 union select 1.0;
 ?column? 
--
1
(1 row)

test=# select 1.0 union select 1;
 ?column? 
--
  1.0
(1 row)

This seems a little bit inconsistent...
--
Tatsuo Ishii

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

http://archives.postgresql.org



Re: [HACKERS] UNION result

2003-01-14 Thread Christopher Kings-Lynne
Seems fine to me - the second select being cast to the type of the first
select.

Chris

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Tatsuo Ishii
 Sent: Wednesday, 15 January 2003 12:04 PM
 To: [EMAIL PROTECTED]
 Subject: [HACKERS] UNION result


 Does anybody know:

 select 1.0 union select 1;
 or
 select 1 union select 1.0;

 should return 1 or 1.0?

 I see below on my Linux box:

 test=# select 1 union select 1.0;
  ?column?
 --
 1
 (1 row)

 test=# select 1.0 union select 1;
  ?column?
 --
   1.0
 (1 row)

 This seems a little bit inconsistent...
 --
 Tatsuo Ishii

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

 http://archives.postgresql.org



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

http://archives.postgresql.org



Re: [HACKERS] psql and readline

2003-01-14 Thread Eric B . Ridge
I've been following this thread, and I thought this might be a good 
place and time to throw in a few additional feature requests.

What about expanding the history capabilities of psql's history command 
(\s) to include something more bash/tcsh-like?  For example:

   !insert
  -- execute the last command that began with insert

   !23
  -- execute item #23 in my history

The above would require \s to output history index numbers.  Might also 
be cool if it would (optionally) truncate each line at the console 
width, so it would be a little easier to read.

And what about some kind of switch to tell psql to combine multi-line 
commands into 1.  So if I type a big select on 5 lines, after executing 
it, it appears as 1 entry in my history.  Say something like \ss for 
history Single and \sv for history Verbatim (or whatever).

Thanks for your time.

eric


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

http://archives.postgresql.org


Re: [HACKERS] 7.3.1 on linux

2003-01-14 Thread Oliver Elphick
On Tue, 2003-01-14 at 20:55, John Liu wrote:
 createlang plpgsql template1
 ERROR:  stat failed on file '$libdir/plpgsql': No such file or directory
 createlang: language installation failed
 
 is the above error normal in 7.3.1 on linux?

I find I'm getting the same.  

This will happen if the plpgsql.so language file is not in the directory
specified by `pg_config --pkglibdir'.  That directory's path is
substituted for '$libdir' by the backend.

-- 
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight, UK http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
 
 For I know that my redeemer liveth, and that he shall 
  stand at the latter day upon the earth 
   Job 19:25 


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])



Re: [HACKERS] UNION result

2003-01-14 Thread Stephan Szabo

On Wed, 15 Jan 2003, Tatsuo Ishii wrote:

 Does anybody know:

 select 1.0 union select 1;
 or
 select 1 union select 1.0;

 should return 1 or 1.0?

Hmm, I think (but am not sure) that the spec bit
in SQL92 that addresses this is 9.3
Set operation result data types based on the
text in 7.10 query expression.  It seems
to say to me that should always be an
approximate numeric (if 1.0 is an approximate
numeric).  Am I reading that right?


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])



Re: [HACKERS] copying perms to another user

2003-01-14 Thread Christopher Kings-Lynne
We have roles?

 -Original Message-
 From: Peter Eisentraut [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, 15 January 2003 1:16 AM
 To: Christopher Kings-Lynne
 Cc: Hackers
 Subject: Re: [HACKERS] copying perms to another user
 
 
 Christopher Kings-Lynne writes:
 
  Often I need to remove a user and cede their permissions to 
 someone else.
 
 If this happens to you a lot, the solution is to implement roles, grant
 privileges to a role, grant the role to a user, and when you remove the
 user you grant the role to someone else.
 
 -- 
 Peter Eisentraut   [EMAIL PROTECTED]
 


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] UNION result

2003-01-14 Thread Bruce Momjian

I think the cause is that multi-type UNION queries use the first query
for casting the other parts of the UNION.  In the old days we would just
reject the query because the UNION columns are of different types.

---

Tatsuo Ishii wrote:
 Does anybody know:
 
 select 1.0 union select 1;
 or
 select 1 union select 1.0;
 
 should return 1 or 1.0?
 
 I see below on my Linux box:
 
 test=# select 1 union select 1.0;
  ?column? 
 --
 1
 (1 row)
 
 test=# select 1.0 union select 1;
  ?column? 
 --
   1.0
 (1 row)
 
 This seems a little bit inconsistent...
 --
 Tatsuo Ishii
 
 ---(end of broadcast)---
 TIP 6: Have you searched our list archives?
 
 http://archives.postgresql.org
 

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])