Re: [HACKERS] [GENERAL] Select works only when connected from login postgres

2016-12-07 Thread Joseph Brenner
Yes, I have a tendency to use emacs sub-shells (and occasionally M-x sql-postgres)-- I thought I'd reproduced the behavior in an xterm, but I was just trying again and I don't see it. It does seem that the dumbness of my dumb terminal is a factor. If I understand the way this works, it could be

Re: [GENERAL] Select works only when connected from login postgres

2016-12-06 Thread Joseph Brenner
But on the other hand, if you've got a blank PAGER envar and a "\pset pager something", the pset should win (just as it does now). On Tue, Dec 6, 2016 at 1:53 PM, Joseph Brenner wrote: > Well, my take would be that if you've taken the trouble to set an > empty stri

Re: [GENERAL] Select works only when connected from login postgres

2016-12-06 Thread Joseph Brenner
Well, my take would be that if you've taken the trouble to set an empty string as the PAGER that means something, and it probably means you don't want any pager to be used. But then, I would say that. On Tue, Dec 6, 2016 at 12:13 PM, Tom Lane wrote: > Joseph Brenner writes: >

Re: [GENERAL] Select works only when connected from login postgres

2016-12-06 Thread Joseph Brenner
; sh: 1: nadatech: not found So the empty PAGER value case is the only one that doesn't seem covered already. (I'm talented about finding these things...) On Tue, Dec 6, 2016 at 9:51 AM, Tom Lane wrote: > Joseph Brenner writes: >> Looking back on the order of events, I th

Re: [GENERAL] Select works only when connected from login postgres

2016-12-06 Thread Joseph Brenner
tion, so I didn't worry about it. So yeah, some better messaging when PAGER is mangled wouldn't hurt, if that's possible. Falling back to "pager off" would make sense to me. On Mon, Dec 5, 2016 at 9:28 PM, Joseph Brenner wrote: > Well yeah, trying to run a PAGER

Re: [GENERAL] Select works only when connected from login postgres

2016-12-05 Thread Joseph Brenner
#x27;postgres' always worked. On Mon, Dec 5, 2016 at 9:03 PM, David G. Johnston wrote: > On Mon, Dec 5, 2016 at 9:53 PM, Joseph Brenner wrote: >> >> And I guess I did that intentionally, my .bashrc has >> >> # I use emacs shells, I got a "pager"

Re: [GENERAL] Select works only when connected from login postgres

2016-12-05 Thread Joseph Brenner
And I guess I did that intentionally, my .bashrc has # I use emacs shells, I got a "pager" already: export PAGER='' On Mon, Dec 5, 2016 at 8:52 PM, Joseph Brenner wrote: > Wait, that's not quite right. The user 'postgres' has no PAGER envar, > but

Re: [GENERAL] Select works only when connected from login postgres

2016-12-05 Thread Joseph Brenner
Wait, that's not quite right. The user 'postgres' has no PAGER envar, but user 'doom' has an empty value: PAGER= On Mon, Dec 5, 2016 at 8:50 PM, Joseph Brenner wrote: >> So what does: >> >> env | grep PAGER >> >> show? > >

Re: [GENERAL] Select works only when connected from login postgres

2016-12-05 Thread Joseph Brenner
> So what does: > > env | grep PAGER > > show? Nothing. I have no PAGER settting (I don't normally use one). On Mon, Dec 5, 2016 at 5:33 PM, Adrian Klaver wrote: > On 12/05/2016 05:13 PM, Joseph Brenner wrote: > > >> I just went around temporarily undoing th

Re: [GENERAL] Select works only when connected from login postgres

2016-12-05 Thread Joseph Brenner
16:17:04 PST [18517-3] doom@doom LOG: statement: set client_encoding to 'unicode' Because I also had this line: \encoding unicode On Sun, Dec 4, 2016 at 9:51 AM, Tom Lane wrote: > Joseph Brenner writes: >>> So what happens when you specify the port in your psql conn

Re: [GENERAL] Select works only when connected from login postgres

2016-12-04 Thread Joseph Brenner
4# (change requires restart) /etc/postgresql/9.4/main/postgresql.conf port = 5432# (change requires restart) On Sun, Dec 4, 2016 at 7:06 AM, Adrian Klaver wrote: > On 12/03/2016 09:38 PM, Joseph Brenner wrote: >>> >>> So is the 9.4 instance the pr

Re: [GENERAL] Select works only when connected from login postgres

2016-12-03 Thread Joseph Brenner
Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5434"? On Sat, Dec 3, 2016 at 9:11 PM, Adrian Klaver wrote: > On 12/03/2016 07:38 PM, Joseph Brenner wrote: >> >> Our story thus far: I've now got three different pg in

Re: [GENERAL] Select works only when connected from login postgres

2016-12-03 Thread Joseph Brenner
; yo doom=# \! ls -lad p* drwxr-xr-x 1 doom doom 12 Nov 16 12:29 perl5 On Sat, Dec 3, 2016 at 7:48 PM, David G. Johnston wrote: > On Saturday, December 3, 2016, Joseph Brenner wrote: >> >> >> doom=# select 'hello' as world; >> doom=# >> >> Noth

Re: [GENERAL] Select works only when connected from login postgres

2016-12-03 Thread Joseph Brenner
d libpq? ldd /usr/lib/postgresql/9.4/bin/psql | egrep libpq libpq.so.5 => /usr/lib/x86_64-linux-gnu/libpq.so.5 (0x7fe9db2ea000) ldd /usr/lib/postgresql/9.6/bin/psql | egrep libpq libpq.so.5 => /usr/lib/x86_64-linux-gnu/libpq.so.5 (0x7fa7337ec000) On Sat, Dec 3, 2016 at 4:51

Re: [GENERAL] No select privileges when not connecting from login postgres

2016-12-03 Thread Joseph Brenner
ling is that can't be the problem, but I'll probably look into some more (Tom Lane seems to feel there might be an issue there). On Sat, Dec 3, 2016 at 4:46 PM, Adrian Klaver wrote: > On 12/03/2016 02:55 PM, Joseph Brenner wrote: >> >> The version in the Debian stable

Re: [GENERAL] Select works only when connected from login postgres

2016-12-03 Thread Joseph Brenner
Yes, and sorry about the re-post. I thought my original message was hung-up in moderation, so I was doing an unsub/resub fandango to get email addresses to match. On Sat, Dec 3, 2016 at 12:13 PM, Adrian Klaver wrote: > On 12/03/2016 12:08 PM, Joseph Brenner wrote: >> >> I'm

Re: [GENERAL] No select privileges when not connecting from login postgres

2016-12-03 Thread Joseph Brenner
> Any unusual errors in the logs? Or maybe a "\o /somefile" in your ~doom/.psqlrc? No, nothing much in the logs after "autovacuum launcher started", and I don't have a .psqlrc file. On Sat, Dec 3, 2016 at 6:56 AM, Julien Rouhaud wrote: > On Wed, Nov 30, 2016 at 0

Re: [GENERAL] No select privileges when not connecting from login postgres

2016-12-03 Thread Joseph Brenner
-D /usr/local/pgsql/data > /var/lib/postgresql-9.6.1/logfile 2>&1 & On Sat, Dec 3, 2016 at 7:23 AM, rob stone wrote: > > On Wed, 2016-11-30 at 20:48 -0800, Joseph Brenner wrote: >> I'm trying to get a new build of 9.6.1 working on a machine >> running Debi

Re: [GENERAL] No select privileges when not connecting from login postgres

2016-12-03 Thread Joseph Brenner
he same way as login 'doom' or login 'postgres': /usr/local/pgsql/bin/psql --dbname=doom --username=doom On Sat, Dec 3, 2016 at 7:10 AM, Adrian Klaver wrote: > On 11/30/2016 08:48 PM, Joseph Brenner wrote: >> >> I'm trying to get a new build of 9.6.1 wo

[GENERAL] Select works only when connected from login postgres

2016-12-03 Thread Joseph Brenner
I'm trying to get a new build of 9.6.1 working on Debian stable and I'm seeing some odd behavior where things work correctly if I run psql when logged in as user 'postgres', but if I'm logged-in as user 'doom' (my usual login), I don't seem to have any select privileges. Even this fails silently:

[GENERAL] No select privileges when not connecting from login postgres

2016-12-03 Thread Joseph Brenner
I'm trying to get a new build of 9.6.1 working on a machine running Debian stable (jessie) and I'm seeing some odd behavior where things work correctly if I run psql when logged in as postgres, but if I run it as user 'doom' (my usual login), I don't seem to have any select privileges. Even this fa

Re: [GENERAL] How to do a "CREATE DATABASE" and then connect to it?

2006-06-04 Thread Joseph Brenner
Terry Lee Tucker <[EMAIL PROTECTED]> wrote: > Joseph Brenner <[EMAIL PROTECTED]> wrote: > > > Joseph Brenner wrote: > > > > > > After you do a "CREATE DATABASE", how do you programatically > > > > connect to what you just creat

Re: [GENERAL] How to do a "CREATE DATABASE" and then connect to it?

2006-06-03 Thread Joseph Brenner
Joshua D. Drake <[EMAIL PROTECTED]> wrote: > Joseph Brenner wrote: > > After you do a "CREATE DATABASE", how do you programatically > > connect to what you just created? > > > > In the psql monitor, you'd use the "\c" command. &

Re: [GENERAL] Querying for strings that match after prefix

2006-06-02 Thread Joseph Brenner
badlydrawnbhoy <[EMAIL PROTECTED]> wrote: > I hope this is the right forum for this, but please correct me if > somewhere else is more appropriate. > > I need to locate all the entries in a table that match , but only after > a number of characters have been ignored. I have a table of email > ad

[GENERAL] How to do a "CREATE DATABASE" and then connect to it?

2006-06-02 Thread Joseph Brenner
After you do a "CREATE DATABASE", how do you programatically connect to what you just created? In the psql monitor, you'd use the "\c" command. If the DATABASE already exists when you connect to postgresql, you use the name when you connect (e.g. "dbname=..."). I'm getting the impression