Re: [GENERAL] getting a list of users

2009-05-25 Thread Eric Smith
OK... never mind, everyone. The problem was elsewhere in the code. Regards, Eric On May 25, 2009, at 5:31 PM, Tom Lane wrote: Eric Smith writes: Seems to work just fine. If, on the other hand, I issue the same command from within the C API: NSString* query = [NSString stringWithFormat:@

Re: [GENERAL] getting a list of users

2009-05-25 Thread Eric Smith
Very interesting. when I set log_statement='all', I see entries for various queries, but I see nothing for the query I list below. If I just use printf() to print out the c-string, it looks just like all the other queries. Eric On May 25, 2009, at 5:31 PM, Tom Lane wrote: Eric Smith wr

Re: [GENERAL] getting a list of users

2009-05-25 Thread Eric Smith
Alrighty so, how do I turn on log_statement? Thanks, Eric On May 25, 2009, at 5:31 PM, Tom Lane wrote: Eric Smith writes: Seems to work just fine. If, on the other hand, I issue the same command from within the C API: NSString* query = [NSString stringWithFormat:@"SELECT usename FROM

Re: [GENERAL] getting a list of users

2009-05-25 Thread Tom Lane
Eric Smith writes: > Seems to work just fine. If, on the other hand, I issue the same > command from within the C API: > NSString* query = [NSString stringWithFormat:@"SELECT usename FROM > pg_catalog.pg_user"]; > postgresResult = PQexec(myConnection, [query UTF8String]); > I get an e

Re: [GENERAL] getting a list of users

2009-05-25 Thread Eric Smith
OK, So I gave up on the universal binary, and just built a PPC version of postgres. If I execute the command: SELECT usename FROM pg_catalog.pg_user; from within psql, I get: usename - esmith radiovision (2 rows) Seems to work just fine. If, on the other hand, I issue t

Re: [GENERAL] getting a list of users

2009-05-10 Thread Dave Page
Fyi, this is exactly what i saw in my first attempts to build a universal binary. Running configure for each architecture and hacking up pg_config.h (per one of the archives links you posted previously) does fix it, though iirc, 32 & 64 bit builds in the same binary will take some more work. On 5/

Re: [GENERAL] getting a list of users

2009-05-10 Thread Tom Lane
Eric Smith writes: > You are correct. On an Intel, the failed command I mentioned earlier > works just fine. > I'm building for, and running on, both PPC and Intel. I've been able > to avoid these snags in the past, but I'm now adding user management > to the app, and I'm dead in the wate

Re: [GENERAL] getting a list of users

2009-05-09 Thread Eric Smith
Tom, Thanks for the detailed info... makes my life a lot easier! Eric On May 9, 2009, at 7:07 PM, Tom Lane wrote: I wrote: That isn't exactly a trivial thing to do, because the pg_config.h data differs for the two arches. It will *not* work to just run a basic configure and build with CFL

Re: [GENERAL] getting a list of users

2009-05-09 Thread Eric Smith
Tom, You are correct. On an Intel, the failed command I mentioned earlier works just fine. I'm building for, and running on, both PPC and Intel. I've been able to avoid these snags in the past, but I'm now adding user management to the app, and I'm dead in the water on the PPC. I'll lo

Re: [GENERAL] getting a list of users

2009-05-09 Thread Tom Lane
I wrote: > That isn't exactly a trivial thing to do, because the pg_config.h data > differs for the two arches. It will *not* work to just run a basic > configure and build with CFLAGS set like that. (If you troll the > pgsql-archives archives for "universal binary" you can probably > find some d

Re: [GENERAL] getting a list of users

2009-05-09 Thread Tom Lane
Eric Smith writes: > You bet... here you go. Hmm, I see you are trying to build universal binaries: > CFLAGS=-arch i386 -arch ppc ... That isn't exactly a trivial thing to do, because the pg_config.h data differs for the two arches. It will *not* work to just run a basic configure and build wit

Re: [GENERAL] getting a list of users

2009-05-09 Thread Eric Smith
You bet... here you go. Thanks, Eric BINDIR = /Users/esmith/SoftwareBuilds/DentalImagingV3/Release/RadioVision.app/Contents/Resources/postgresql/bin DOCDIR = INCLUDEDIR = /Users/esmith/SoftwareBuilds/DentalImagingV3/Release/RadioVision.app/Contents/Resources/postgresql/include PKGINCLUDEDIR =

Re: [GENERAL] getting a list of users

2009-05-09 Thread Tom Lane
Eric Smith writes: > I actually started with the source: postgresql-8.3.5.tar.gz, from the > source download location. I just build straight from that source... > no mucking around with any of the sources. Hmph, now I'm really mystified. If the straight source build were this broken we'd su

Re: [GENERAL] getting a list of users

2009-05-09 Thread Eric Smith
I actually started with the source: postgresql-8.3.5.tar.gz, from the source download location. I just build straight from that source... no mucking around with any of the sources. Eric On May 9, 2009, at 5:44 PM, Tom Lane wrote: Eric Smith writes: Yep, using that command gives me the e

Re: [GENERAL] getting a list of users

2009-05-09 Thread Tom Lane
Eric Smith writes: > Yep, using that command gives me the error. > I'm using a build that came from the postgres website, and just uses > the config that comes with it. Hmm, you mean the EDB one-click installer? I don't offhand see another binary distro for OSX there. It seems unlikely that t

Re: [GENERAL] getting a list of users

2009-05-09 Thread Eric Smith
Yep, using that command gives me the error. I'm using a build that came from the postgres website, and just uses the config that comes with it. Eric On May 9, 2009, at 5:16 PM, Tom Lane wrote: Eric Smith writes: When I try the command below, I get the very familiar error: "expected ju

Re: [GENERAL] getting a list of users

2009-05-09 Thread Tom Lane
Eric Smith writes: > When I try the command below, I get the very familiar error: "expected > just one rule action" You mean this? regression=# SELECT usename FROM pg_catalog.pg_user; usename -- postgres (1 row) If you're getting that sort of error from standard views then there

Re: [GENERAL] getting a list of users

2009-05-09 Thread Eric Smith
All, When I try the command below, I get the very familiar error: "expected just one rule action" I'm running 8.3.5 on Mac OS 10.5.6. Any ideas? Thanks, Eric On May 7, 2009, at 11:24 PM, Albe Laurenz wrote: Eric Smith wrote: How do I get a list of database usernames using the postgres C

Re: [GENERAL] getting a list of users

2009-05-07 Thread Albe Laurenz
Eric Smith wrote: > How do I get a list of database usernames using the postgres C API? Execute this query: SELECT usename FROM pg_catalog.pg_user and read the results. Yours, Laurenz Albe -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscri

Re: [GENERAL] getting a list of users

2009-05-07 Thread Eric Smith
Never mind, everyone. I figured it out. On May 7, 2009, at 8:05 PM, Eric Smith wrote: All, How do I get a list of database usernames using the postgres C API? Thanks, Eric -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www

[GENERAL] getting a list of users

2009-05-07 Thread Eric Smith
All, How do I get a list of database usernames using the postgres C API? Thanks, Eric -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general