Re: [GENERAL] Fwd: [BUGS] BUG #14850: Implement optinal additinal parameter for 'justify' date/time function

2017-10-12 Thread Brian Dunavant
A 'month' is an abstract measurement of time. Sometimes it's 29 days, 30, or 31. You cannot say "I have 30 days, how many months is that?" because the answer is "it depends". - gives you an interval in days. In your example, you took Jan 31 2016 and added "1 month". Postgres says "I know f

Re: [GENERAL] How to handle simultaneous FOR-IN UPDATE-RETURNING loops?

2017-07-10 Thread Brian Dunavant
"FOR UPDATE" is part of "SELECT" not part of "UPDATE". You can select the rows "for update" which will lock those rows. You can then loop over the the results of the 'select' to do the rest of your logic. Be careful doing this if other things are also updating these rows. With SKIP LOCKED you ca

Re: [GENERAL] Select from tableA - if not exists then tableB

2017-05-10 Thread Brian Dunavant
On Tue, May 9, 2017 at 6:00 PM, Patrick B wrote: > SELECT > split_part(n1.path::text, '/'::text, 18)::integer AS id, > split_part(n1.path::text, '/'::text, 14)::integer AS clientid, > lower(n1.md5::text)::character(32) AS md5, 0 AS cont, > '-1000-1000-3000-6000'::uuid AS guid, > n1

Re: [GENERAL] Select from tableA - if not exists then tableB

2017-05-08 Thread Brian Dunavant
>From what you're saying about migrating, I'm assuming the new table has additional columns or something. If you can map the difference, then you could use CTE's to select from the first table, and if nothing is there, then pull from the second table and pad it with nulls so they "match". This sh

Re: [GENERAL] Confusing order by error

2017-03-31 Thread Brian Dunavant
From the docs you linked: "Each expression can be the name or ordinal number of an output column (SELECT list item), or it can be an arbitrary expression formed from input-column values." The "name" in your order by is a reference to the output column. The following example shows the same with "

Re: [GENERAL] Request to add feature to the Position function

2017-03-27 Thread Brian Dunavant
, 2017 at 12:16 PM, Adrian Klaver wrote: > On 03/27/2017 09:03 AM, Brian Dunavant wrote: >> >> That does not return the correct answer for the original poster's request. >> >> flpg=# select position('om' in reverse('Tomomasaaa')); >>

Re: [GENERAL] Request to add feature to the Position function

2017-03-27 Thread Brian Dunavant
That does not return the correct answer for the original poster's request. flpg=# select position('om' in reverse('Tomomasaaa')); position -- 15 (1 row) On Mon, Mar 27, 2017 at 11:43 AM, Adrian Klaver wrote: > On 03/27/2017 08:05 AM, Ron Ben wrote: >> >> Hi, >> positio

Re: [GENERAL] INSERT and ON CONFLICT

2017-03-10 Thread Brian Dunavant
I believe the following test should answer your question. db=# create table test ( a integer not null unique ); CREATE TABLE db=# insert into test values (1); INSERT 0 1 db=# insert into test values (1); ERROR: duplicate key value violates unique constraint "test_a_key" DETAIL: Key (a)=(1) alr

Re: [GENERAL] Recovery Assistance

2017-01-29 Thread Brian Mills
might have something wrong about the process. Any thoughts on the above log? *Brian Mills* CTO *Mob: *0410660003 *Melbourne* 03 9012 3460 or 03 8376 6327 *|* *Sydney* 02 8064 3600 *|* *Brisbane* 07 3173 1570 Level 1 *|* 600 Chapel Street *|* South Yarra*|* VIC *|* 3141 *|* Australia &

Re: [GENERAL] Recovery Assistance

2017-01-28 Thread Brian Mills
postgres? The log mentions this: 2017-01-27 20:36:18 AEDT LOG: last completed transaction was at log time 2017-01-24 02:08:00.023064+11 (which is moments before, or possibly as the disk filled up doing a db backup dump) *Brian Mills* CTO *Mob: *0410660003 *Melbourne* 03 9012 3460 or 03 8376 6327

Re: [GENERAL] Recovery Assistance

2017-01-28 Thread Brian Mills
I have a consistent sql dump from 24 hour previous. The file level backup was done with rsync -a of full data directory after the issue occurred so could reset as I learned. Brian On Sun, 29 Jan 2017 at 9:18 am, Adrian Klaver wrote: > On 01/28/2017 01:55 PM, Brian Mills wrote: > >

Re: [GENERAL] Recovery Assistance

2017-01-28 Thread Brian Mills
0001000500A3 *Brian Mills* CTO *Mob: *0410660003 *Melbourne* 03 9012 3460 or 03 8376 6327 *|* *Sydney* 02 8064 3600 *|* *Brisbane* 07 3173 1570 Level 1 *|* 600 Chapel Street *|* South Yarra*|* VIC *|* 3141 *|* Australia <https://www.facebook.com/TryBooking/> <https://tw

Re: [GENERAL] Recovery Assistance

2017-01-28 Thread Brian Mills
is starting up 2017-01-28 23:00:01 AEDT FATAL: the database system is starting up 2017-01-29 07:14:00 AEDT FATAL: the database system is starting up I also still can't connect. postgres@atlassian:/home/tbadmin$ psql psql: FATAL: the database system is starting up *Brian Mills* CTO

Re: [GENERAL] Recovery Assistance

2017-01-27 Thread Brian Mills
Which is still later datetime than the /var/log/postgres... log. Connection attempt shows the same log postgres@atlassian:/home/myuser$ psql psql: FATAL: the database system is starting up Nothing in the syslog that seems connected. *Brian Mills* CTO *Mob: *0410660003 *Melbourne* 03 9012 3460

[GENERAL] Recovery Assistance

2017-01-27 Thread Brian Mills
e given myself this weekend to attempt to recover more than the last backup, after that I need to restore the service for my team to use and suck up the lost last day of updates. Thanks, Brian

Re: [GENERAL] error updating a tuple after promoting a standby

2016-12-22 Thread Brian Sutherland
; ERROR: could not read block 12281 in file "base/16384/29153": read only 0 > of 8192 bytes > ginopino=# select * from stato where id=409; <<< IT WORKS FINE -- Brian Sutherland -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] bitwise storage and operations

2016-09-27 Thread Brian Dunavant
If it's in integer columns, bitwise logic works just like you would expect it to as well. https://www.postgresql.org/docs/current/static/functions-math.html db=# select 'foo' where (9 & 1) > 0; ?column? -- foo (1 row) db=# select 'foo' where (9 & 2) > 0; ?column? -- (0 rows) J

Re: [GENERAL] After replication failover: could not read block X in file Y read only 0 of 8192 bytes

2016-05-31 Thread Brian Sutherland
On Tue, May 31, 2016 at 04:49:26PM +1000, Venkata Balaji N wrote: > On Mon, May 30, 2016 at 11:37 PM, Brian Sutherland > wrote: > > > I'm running a streaming replication setup with PostgreSQL 9.5.2 and have > > started seeing these errors on a few INSERTs: > >

[GENERAL] After replication failover: could not read block X in file Y read only 0 of 8192 bytes

2016-05-30 Thread Brian Sutherland
checksums switched on so am suspecting a streaming replication bug. Anyone know of a recent bug which could have caused this? -- Brian Sutherland -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Partitioning and ORM tools

2016-03-29 Thread Brian Fehrle
ore -- Best Wishes, Chris Travers Efficito: Hosted Accounting and ERP. Robust and Flexible. No vendor lock-in. http://www.efficito.com/learn_more All; Thanks for the great Ideas, I'll let you know where we end up. Brian FehrleDatabase Administrator I

Re: [GENERAL] CoC [Final v2]

2016-01-25 Thread Brian Dunavant
>> Participation does not need to be limited to copy-editing. Of all the >> ways to develop a community CoC, we're engaged in just about the worst >> possible one right now. > > so what would be a better way of developing this ? Of interesting note, the Ruby community is currently considering swi

[GENERAL] Possible to dump/load a database from within psql?

2016-01-25 Thread Brian Cardarella
Is it possible, and if so how, to dump and then load a database to/from a file from within a psql connection? -- Brian Cardarella CEO of DockYard Visit us: http://dockyard.com Call us: (855) DOCK-YRD Follow me on Twitter: http://twitter.com/bcardarella Follow us on Twitter

Re: [GENERAL] CoC [Final]

2016-01-20 Thread Brian Dunavant
> * Participants who disrupt the collaborative space, or participate in > a pattern of behaviour which could be considered harassment will not > be tolerated. Perhaps changing the ", or participate" to " by engaging" would make that statement more focused. > "Disrupting the collaborative space" i

Re: [GENERAL] WIP: CoC

2016-01-11 Thread Brian Dunavant
>> "3) A safe, respectful, productive and collaborative environment is >> free of negative personal criticism directed at a member of a >> community, rather than at the technical merit of a topic." >> > A safe, respectful, productive and collaborative environment is free > of non-technical or per

Re: [GENERAL] WIP: CoC

2016-01-11 Thread Brian Dunavant
> 3. A safe, respectful, productive and collaborative environment is free > comments related to gender, sexual orientation, disability, physical > appearance, body size or race. I think you meant "free OF comments". However it still picks a few special classes of complaint, some of which cause am

Re: [GENERAL] Code of Conduct: Is it time?

2016-01-11 Thread Brian Dunavant
> We expect of everyone in our spaces to try their best to do the same in a > kind and gentle manner. If you feel it's just a minor offense and the person > didn't mean harm by it, > > simply ignore it unless the pattern of talk continues. If the person > continues or they say something you feel is

[GENERAL] [PostgreSQL+SOCI+BOOST] Compile error in core\exchange-traits.h with PG and SOCI on Windows

2015-12-10 Thread Lawry, Brian
7;x_type' : undeclared identifier in core\exchange-traits.h sql << "SELECT i, s FROM t WHERE i = 0", soci::into(r); std::cout << r.get<0>() << "\t" << r.get<1>() << std::endl; return(0); } //-

Re: [GENERAL] Bi-Directional replication(BDR)

2015-08-04 Thread Brian Dunavant
I would suggest going to http://bdr-project.org/docs/stable/index.html On Tue, Aug 4, 2015 at 3:47 PM, wrote: > Hi, > > > > Please help me on: > > > > what is the use of bidirectional replication in PostgreSQL? > > How BDR works? > > how to setup BDR? > > on which versions BDR works? > > > > Th

[GENERAL] to_tsvector() with hyphens

2015-07-06 Thread Brian DeRocher
_rank_cd( to_tsvector( 'gn series bandage' ), to_tsquery( 'gn | bandage' ) ); ts_rank_cd 0.2 (1 row) So wouldn't this be a better query for hyphenated words? 'gn-foo' | 'gn' | 'foo' Aside: Best i can tell the parser i

Re: [GENERAL] date with month and year

2015-05-21 Thread Brian Dunavant
On Thu, May 21, 2015 at 5:27 PM, Thomas Kellerer wrote: > Postgres does not store the time zone. When storing a timestamp with time > zone, it > is normalized to UTC based on the timezone of the client. When you retrieve > it, > it is adjusted to the time zone of the client. > Sorry, I misspoke.

Re: [GENERAL] date with month and year

2015-05-21 Thread Brian Dunavant
erting back from UTC+time zone is no longer the time that you were supposed to have been at the meeting. If you had stored that future date as a timestamp WITHOUT time zone you would have still been on-time. This is only an issue for future dates, not past ones. -Brian Dunavant (time is ha

Re: [GENERAL] Some indexing advice for a Postgres newbie, please?

2015-02-19 Thread brian
On Thu, 19 Feb 2015 09:30:57 -0700, you wrote: >On 02/19/2015 09:10 AM, brian wrote: >> Hi folks, >> >> I have a single-user application which is growing beyond the >> fixed-format data files in which it currently holds its data, I need a >> proper database

Re: [GENERAL] Some indexing advice for a Postgres newbie, please?

2015-02-19 Thread Brian Dunavant
You should consider a BitString. http://www.postgresql.org/docs/9.4/static/datatype-bit.html On Thu, Feb 19, 2015 at 11:10 AM, brian wrote: > > Hi folks, > > I have a single-user application which is growing beyond the > fixed-format data files in which it currently holds its

[GENERAL] Some indexing advice for a Postgres newbie, please?

2015-02-19 Thread brian
quite. :( Thanks, Brian. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Failure loading materialized view with pg_restore

2015-02-19 Thread Brian Sutherland
On Wed, Feb 18, 2015 at 10:34:33AM -0500, Tom Lane wrote: > Brian Sutherland writes: > > If I run this set of commands against PostgreSQL 9.4.1 I pg_restore > > throws an error with a permission problem. Why it does so is a mystery > > to me, given that the user perfor

[GENERAL] Failure loading materialized view with pg_restore

2015-02-18 Thread Brian Sutherland
or relation x Command was: REFRESH MATERIALIZED VIEW myview; In pg_hba I am using the "trust" method for everything (this is a test cluster). Is this expected behaviour or a bug? -- Brian Sutherland -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] SELECT, GROUP BY, and aggregates

2015-02-13 Thread Brian Dunavant
To lower the amount of time spent copy pasting aggregate column names, it's probably worth noting Postgres will allow you to short cut that with the column position. For example: select long_column_name_A, long_column_name_b, count(1) from foo group by 1,2 order by 1,2 This works just fine. It'

Re: [GENERAL] Fwd: Ask for a question

2015-01-21 Thread Brian Dunavant
This is not quite true. I don't believe there are any flight simulator easter-eggs hidden inside the Postgres code. :) On Wed, Jan 21, 2015 at 10:59 AM, Rémi Cura wrote: > More bluntly maybe : > > if you can do it in Excel, > you can do it in Postgres. > > Cheers, > Rémi-C > > 2015-01-21 16:37

Re: [GENERAL] Simple Atomic Relationship Insert

2015-01-13 Thread Brian Dunavant
A very good point, but it does not apply as here (and in my article) we are not using updates, only insert and select. On Tue, Jan 13, 2015 at 6:03 PM, Thomas Kellerer wrote: > Brian Dunavant wrote on 13.01.2015 22:33: >> >> What issue are you having? I'd imagine you have

Re: [GENERAL] Simple Atomic Relationship Insert

2015-01-13 Thread Brian Dunavant
WHERE NOT EXISTS(SELECT 1 FROM sel) > RETURNING id > ) > SELECT id INTO hometown_id FROM ins UNION ALL SELECT id FROM sel; > RETURN hometown_id; > > EXCEPTION WHEN unique_violation > THEN > END; > END LOOP; > END; > $ LANGUAGE plpgsql; >

Re: [GENERAL] Simple Atomic Relationship Insert

2015-01-13 Thread Brian Dunavant
With the single CTE I don't believe you can do a full upsert loop. If you're doing this inside of a postgres function, your changes are already atomic, so I don't believe by switching you are buying yourself much (if anything) by using a CTE query instead of something more traditional here. The a

Re: [GENERAL] Simple Atomic Relationship Insert

2015-01-13 Thread Brian Dunavant
What issue are you having? I'd imagine you have a race condition on the insert into hometowns, but you'd have that same race condition in your app code using a more traditional 3 query version as well. I often use CTEs like this to make things atomic. It allows me to remove transactional code ou

[GENERAL] Question about partial functional indexes and the query planner

2014-06-10 Thread Brian Dunavant
? I've been stumped on it. -Brian Dunavant Test script to display behavior below: -- Setup the test data CREATE OR REPLACE FUNCTION public.return_if_even(v_id integer) returns integer LANGUAGE sql AS $$ SELECT case when v_id % 2 = 1 then 0 else v_id end; $$; create

Re: [GENERAL] To monitor the number of PostgreSQL database connections?

2014-03-26 Thread Brian Cosgrove
I know this isn't exactly what you're looking for (a query or log), but we use this tool to monitor our connections and alert when they hit a particular threshold: http://bucardo.org/check_postgres/check_postgres.pl.html#backends On Wed, Mar 26, 2014 at 12:31 AM, Nithya Soman wrote: > Hi > > Co

Re: [GENERAL] PG choosing nested loop for set membership?

2014-03-26 Thread Brian Crowell
t a cardinality any less than the inputs (they're already one), so the nested loop sees an estimate that's less than the product of its inputs. Or that's my guess anyhow. Thanks for having a look! --Brian -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)

Re: [GENERAL] PG choosing nested loop for set membership?

2014-03-26 Thread Brian Crowell
Just removing the coalesce (acc.rule_set_id = lu.permission_rule_set_id) does this: 'Hash Join (cost=2.62..10.31 rows=133 width=10) (actual time=0.063..0.257 rows=241 loops=1)' ' Output: acc.account, acc.manager, acc.is_fund' ' Hash Cond: (acc.rule_set_id = lu.permissio

Re: [GENERAL] PG choosing nested loop for set membership?

2014-03-26 Thread Brian Crowell
s=241 loops=1)' 'Output: acc.rule_set_id, acc.account, acc.manager, acc.is_fund' 'Index Cond: (acc.rule_set_id = u.permission_rule_set_id)' 'Buffers: shared hit=3' 'Total runtime: 0.297 ms' I'll see if I can write an isolated test case for the coalesce misestimate. Or do you think the query planner will ever be able to do anything with that form? --Brian -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] PG choosing nested loop for set membership?

2014-03-25 Thread Brian Crowell
of tricking it. I haven't tried EXISTS. I'll have to try that tomorrow. --Brian -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] PG choosing nested loop for set membership?

2014-03-25 Thread Brian Crowell
sonated_user.permission_rule_set_id, real_user.permission_rule_set_id))' 'Buffers: shared hit=3' 'Total runtime: 0.313 ms' All of the estimates on this view are reasonable, except for that nested loop at the top. The only thing I can think is that it's uncertain which ID I will pick, and I can't help it there. --Brian -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] PG choosing nested loop for set membership?

2014-03-25 Thread Brian Crowell
o thinking there will be 100 rows. That _really_ feels like cheating. Besides the above, is there anything I can do to get Postgres to do a hash instead of a nested loop? --Brian -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Recovering from failed transaction

2014-03-10 Thread Brian Crowell
at's the clue I needed. I was misinterpreting Postgres's log file; it was complaining about the "SET statement_timeout" statement Npgsql was slipping ahead of my ROLLBACK. Apparently I need to do transactions with Npgsql's transaction class. --Brian -- Sent via pgsql-general mailing

[GENERAL] Recovering from failed transaction

2014-03-10 Thread Brian Crowell
n continue using the connection, and I get error 25P02: "current transaction is aborted, commands ignored until end of transaction block." ...doesn't "ROLLBACK" end a transaction block? What does Postgres want here? How can I retry without closing the connection altogether?

Re: [GENERAL] GSSAPI/SSPI and mismatched user names

2014-02-24 Thread Brian Crowell
/7613468/getting-the-current-username-when-impersonated https://groups.google.com/forum/#!topic/microsoft.public.platformsdk.security/5L7ugO0Fc90 (Really, though, the Windows login infrastructure and API is rather nice.) > Exactly- this is not something we can solve with a little bit of >

Re: [GENERAL] GSSAPI/SSPI and mismatched user names

2014-02-24 Thread Brian Crowell
On Mon, Feb 24, 2014 at 12:55 PM, Stephen Frost wrote: > * Brian Crowell (br...@fluggo.com) wrote: >> https://github.com/npgsql/Npgsql/issues/162#issuecomment-35916650 > > Reading through this- can't you use GSSAPI to get the Kerberos princ > found the ticket which is c

[GENERAL] GSSAPI/SSPI and mismatched user names

2014-02-24 Thread Brian Crowell
ser name in the startup packet for these two login types. What do you think? --Brian

Re: [GENERAL] GSSAPI server side on Linux, SSPI client side on Windows

2014-02-21 Thread Brian Crowell
er account with a password that can't change, and then use ktpass to generate a password and create an appropriate keytab. You may or may not be able to use ktpass to set up an SPN, I didn't go about that in an orthodox way. --Brian On Tue, Nov 12, 2013 at 9:13 AM, Brian Crowell wrot

Re: [GENERAL] ERROR: out of memory DETAIL: Failed on request of size ???

2013-11-28 Thread Brian Wong
> Date: Fri, 22 Nov 2013 20:11:47 +0100 > Subject: Re: [GENERAL] ERROR: out of memory DETAIL: Failed on request of size > ??? > From: t...@fuzzy.cz > To: bwon...@hotmail.com > CC: brick...@gmail.com; pgsql-general@postgresql.org > > On 19 Listopad 2013, 5:30, Brian Wong w

Re: [GENERAL] ERROR: out of memory DETAIL: Failed on request of size ???

2013-11-22 Thread Brian Wong
load whatsoever. Unfortunately, the error doesn't say what kinda memory ran out. --- Original Message --- From: "bricklen" Sent: November 18, 2013 7:25 PM To: "Brian Wong" Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] ERROR: out of memory DETAIL: Failed on reque

[GENERAL] ERROR: out of memory DETAIL: Failed on request of size ???

2013-11-18 Thread Brian Wong
ng a lot of googling, I've tried setting FETCH_COUNT on psql AND/OR setting work_mem. I'm just not able to work around this issue, unless if I take most of the MAX() functions out but just one. Would anyone give me some hints on how to resolve this issue? Brian

Re: [GENERAL] GSSAPI server side on Linux, SSPI client side on Windows

2013-11-12 Thread Brian Crowell
d an issue where connection pooling doesn't distinguish between Integrated Security users. I tried to fix that. Hopefully it's ship-shape. —Brian -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] GSSAPI server side on Linux, SSPI client side on Windows

2013-11-12 Thread Brian Crowell
It cannot be shortened to > GetUserNameEx(NameUserPrincipal) because that also returns "logon screen" > case. I don't see any reason this can't be put in Npgsql. If the username isn't supplied, the NpgsqlConnectionStringBuilder guesses it in the UserName property. I&

Re: [GENERAL] GSSAPI server side on Linux, SSPI client side on Windows

2013-11-12 Thread Brian Crowell
On Mon, Nov 11, 2013 at 11:56 PM, Christian Ullrich wrote: >> On Mon, Nov 11, 2013 at 10:51 PM, Brian Crowell wrote: >> * If I don't specify my username, Npgsql sends it in lowercase "bcrowell" > > Hmm. That is related one problem I've been having with SSPI

Re: [GENERAL] GSSAPI server side on Linux, SSPI client side on Windows

2013-11-12 Thread Brian Crowell
On Tue, Nov 12, 2013 at 9:13 AM, Brian Crowell wrote: > net ads keytab add postgres/machinen...@realm.com -U DOMAIN\Administrator > net ads keytab add postgres/machinename.domain@realm.com -U > DOMAIN\Administrator D'oh! These should be: net ads keytab add pos

Re: [GENERAL] GSSAPI server side on Linux, SSPI client side on Windows

2013-11-12 Thread Brian Crowell
ndows machine you should be able to go to the command prompt and do: psql --host=machinename.domain.com --username=bcrow...@realm.com postgres ...and get in without any password prompts, assuming you got the case on your username correct. If the case is wrong, Postgres will tell you what it'

Re: [GENERAL] GSSAPI server side on Linux, SSPI client side on Windows

2013-11-11 Thread Brian Crowell
On Mon, Nov 11, 2013 at 10:51 PM, Brian Crowell wrote: > I think I'm getting closer though. I have psql on Windows successfully > authenticating, so I can't be too far off. Got it. The NpgsqlPasswordPacket class has a bug: a utility function it calls appends a null character to

Re: [GENERAL] GSSAPI server side on Linux, SSPI client side on Windows

2013-11-11 Thread Brian Crowell
t; The GSSAPI error messages are of the usual helpful kind, even including the > colon that is followed by no detail. I've been trying to enable the KRB5_TRACE environment variable in the Postgres child processes, but I can't seem to make it stick. That would (should!) provide som

Re: [GENERAL] GSSAPI server side on Linux, SSPI client side on Windows

2013-10-30 Thread Brian Crowell
I've thought of one option, which I'm investigating: implementing GSSAPI support in Npgsql. Microsoft claims this is possible using the SSPI API: http://msdn.microsoft.com/en-us/library/windows/desktop/aa380496(v=vs.85).aspx —Brian On Wed, Oct 30, 2013 at 3:16 PM, Brian Crowell wrot

[GENERAL] GSSAPI server side on Linux, SSPI client side on Windows

2013-10-30 Thread Brian Crowell
the docs are wrong, and SSPI isn't available server-side on Linux, what are my other options? —Brian -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Preserving the source code of views

2013-10-20 Thread Brian Crowell
ong. I'm big on views because that allows my client code to do very specific queries without having to write new SPs all the time. --Brian -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Preserving the source code of views

2013-10-20 Thread Brian Crowell
On Sun, Oct 20, 2013 at 7:01 AM, Bill Moran wrote: > You could adjust your workflow to use something like dbsteward: > http://dbsteward.org/ Nifty, but without an editor, I don't think I could convince our developers to author the databases in XML. --Brian -- Sent via pgsql-gene

Re: [GENERAL] Preserving the source code of views

2013-10-20 Thread Brian Crowell
ects at the beginning of the script, just in case there's a change in the number or types of columns? That seems tricky, especially considering there will be modules that depend on yours. You also mentioned an external CMS. Any suggestions? --Brian -- Sent via pgsql-general mailing list (p

[GENERAL] Preserving the source code of views

2013-10-19 Thread Brian Crowell
to preserve the original source code of a view as entered in the CREATE VIEW statement? --Brian

Re: [GENERAL] ERROR: invalid value "????" for "YYYY"

2013-10-09 Thread Brian Wong
extra data that's showing up is being added to the resultset cuz without the additional where clause, the result set did not contain any of those rows like pg_statistics/etc. Brian On Tue, Oct 8, 2013 at 4:10 PM, Steve Crawford < scrawf...@pinpointresearch.com> wrote: > On 10/08/2

Re: [GENERAL] ERROR: invalid value "????" for "YYYY"

2013-10-08 Thread Brian Wong
hema to be the one that I want. So those internal pg_* views shouldn't even show up in the query. Brian On Tue, Oct 8, 2013 at 1:50 PM, Brian Wong wrote: > I'm posting this question to > pgsql-general<http://www.postgresql.org/list/pgsql-general/>. > Hopefully someone

[GENERAL] ERROR: invalid value "????" for "YYYY"

2013-10-08 Thread Brian Wong
ghtmost 8 characters of all the table names are dates. So only date strings are passed to the to_date function. Absolutely nothing containing the string "tati" is passed to the to_date function. What is going on? Is that a bug? Brian

Re: [GENERAL] View permission error after upgrading from 8.4 -> 9.2

2013-08-13 Thread Brian Hirt
.   I can do another pg_restore and see if the problem is reproducible if you want. On Aug 13, 2013, at 12:03 PM, Tom Lane wrote: Brian Hirt writes: I'm upgrading our database from 8.4 to 9.2 and I've run across a view that is no longer working. � When selecting from the vie

[GENERAL] View permission error after upgrading from 8.4 -> 9.2

2013-08-13 Thread Brian Hirt
I'm upgrading our database from 8.4 to 9.2 and I've run across a view that is no longer working.   When selecting from the view, I get a permission denied error on one of the referenced tables.   However, I can run the view's query directly without problems and I have read access to all the tab

[GENERAL] Cannot start PG as a Windows Service on Server 2008 and Windows 8

2013-01-30 Thread Brian Janes
a directory, so there isn't a permissions issue on the directory (I did verify it anyway to be sure). In both cases, PG starts up fine in the command prompt manually using pg_ctl. This issue is killing me and any pointers would be greatly appreciated. *Brian Janes* Technical Product Manager

Re: [GENERAL] plpython intermittent ImportErrors

2013-01-17 Thread Brian Sutherland
On Thu, Jan 17, 2013 at 01:25:54PM +0100, Alban Hertroys wrote: > On 17 January 2013 12:30, Brian Sutherland wrote: > > > > (we use buildout for our Python code, but our plpythonu stored > > > procedures use the stock standard Python environment, as provided by &

Re: [GENERAL] plpython intermittent ImportErrors

2013-01-17 Thread Brian Sutherland
On Thu, Jan 17, 2013 at 03:18:09PM +0700, Stuart Bishop wrote: > On Mon, Jan 14, 2013 at 11:30 PM, Brian Sutherland > wrote: > > Hi, > > > > I have a plpython stored procedure which sometimes fails when I run my > > applications automated test suite. The procedure i

Re: [GENERAL] plpython intermittent ImportErrors RESOLVED

2013-01-16 Thread Brian Sutherland
On Mon, Jan 14, 2013 at 09:05:09AM -0800, Adrian Klaver wrote: > On 01/14/2013 08:30 AM, Brian Sutherland wrote: > >Hi, > > > >I have a plpython stored procedure which sometimes fails when I run my > >applications automated test suite. The procedure is called hundreds o

Re: [GENERAL] plpython intermittent ImportErrors

2013-01-16 Thread Brian Sutherland
On Wed, Jan 16, 2013 at 08:10:26AM +1100, Chris Angelico wrote: > On Tue, Jan 15, 2013 at 4:55 AM, Brian Sutherland > wrote: > > I'm guessing that it's some kind of race condition, but I wouldn't know > > where to start looking. > > Look for a recursive i

Re: [GENERAL] plpython intermittent ImportErrors

2013-01-14 Thread Brian Sutherland
On Mon, Jan 14, 2013 at 09:05:09AM -0800, Adrian Klaver wrote: > On 01/14/2013 08:30 AM, Brian Sutherland wrote: > >Hi, > > > >I have a plpython stored procedure which sometimes fails when I run my > >applications automated test suite. The procedure is called hundreds o

[GENERAL] plpython intermittent ImportErrors

2013-01-14 Thread Brian Sutherland
hange or disappear. The behaviour is the same with PostgreSQL versions 9.2.2 and 9.1.7. I have tried (but failed) to reproduce this error in a simple .sql script. Outside of the tests, it always seems to work. Having run into a brick wall debugging this, I'm hoping there's someone here

Re: [GENERAL] Problem running "ALTER TABLE...", ALTER TABLE waiting

2012-08-10 Thread Brian McNally
seems that maybe there is prepared transaction that could be holding up the ALTER TABLE. I'm a bit confused though since previous attempts to find that didn't succeed. Maybe I just haven't used to correct query yet. -- Brian McNally On 08/09/2012 12:30 AM, Sergey Konoplev wrote

Re: [GENERAL] Problem running "ALTER TABLE...", ALTER TABLE waiting

2012-08-08 Thread Brian McNally
Ok, I'm running with all available updates and kernel 2.6.18-308.4.1.el5 but am still having the same problem. -- Brian McNally On 08/07/2012 05:29 PM, Sergey Konoplev wrote: On Wed, Aug 8, 2012 at 4:27 AM, Brian McNally wrote: RHEL 5.7 on both. 2.6.18-274.el5 on the system that

Re: [GENERAL] Problem running "ALTER TABLE...", ALTER TABLE waiting

2012-08-08 Thread Brian McNally
mple_query (query_string=0x95e3310 "alter table samples add column esp_race text;") at postgres.c:1060 #13 0x005f6ff4 in PostgresMain (argc=, argv=, username=) at postgres.c:3978 #14 0x005c6e35 in ServerLoop () at postmaster.c:3565 #15 0x005c7b3c in PostmasterM

Re: [GENERAL] Problem running "ALTER TABLE...", ALTER TABLE waiting

2012-07-18 Thread Brian McNally
Hi Raghu, I don't get any rows returned back from that query. I'm running it while connected to the DB in question. Am I supposed to substitute values for any of the variables in the query? -- Brian McNally On 07/17/2012 07:23 PM, raghu ram wrote: On Wed, Jul 18, 2012 at 1:24

[GENERAL] Problem running "ALTER TABLE...", ALTER TABLE waiting

2012-07-17 Thread Brian McNally
en't been able to find it. Any ideas? Thanks for any help, -- Brian McNally -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Not understanding this behavior of a subselect + volatile function

2012-05-26 Thread Brian Palmer
Thanks so much tom! I feel a lot better going with this fix now that I know for sure what was going wrong. -- Brian On May 26, 2012, at 8:08 PM, Tom Lane wrote: > Brian Palmer writes: >> The final line, the select, will return the row as it was before the >> function ran, (

Re: [GENERAL] Not understanding this behavior of a subselect + volatile function

2012-05-26 Thread Brian Palmer
and then select * where a = $a . I'm still really curious about what's going on here though. Thanks for the insight! -- Brian -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Not understanding this behavior of a subselect + volatile function

2012-05-26 Thread Brian Palmer
27;s been difficult to debug so far. Is it possible for the subselect to have a view from a slightly different point in time than the outer select? I wouldn't think so, but I'm not sure how else to explain what is happening. -- Brian

[GENERAL] Not understanding this behavior of a subselect + volatile function

2012-05-26 Thread Brian Palmer
er select. That's definitely not happening here, and I'm wondering why -- is it a property of volatile functions? Do they get their own, separate view of the data, even inside the same transaction? Thanks for any insight on this puzzler, -- Brian Palmer -- Sent via pgsql-general

Re: [GENERAL] scripted 'pg_ctl start' hangs and never finishes, goes

2012-03-28 Thread Brian Fehrle
from another server. - Brian F On 03/28/2012 04:31 PM, Brian Fehrle wrote: Hi all, OS: Linux 64bit PostgreSQL Version: 9.0.5 installed from source. - Brian F

[GENERAL] scripted 'pg_ctl start' hangs and never finishes, goes

2012-03-28 Thread Brian Fehrle
ed on the same environment whether I'm doing it from within perl on the actual cluster, or over an ssh command such as ssh user@standby "pg_ctl -D /path/to/data/ start". What's in common is that the pg_ctl becomes a child process of something other than my own shell, could that be the issue? Thanks in advance, - Brian F

Re: [GENERAL] Single server multiple databases - extension

2012-03-06 Thread Brian Trudal
That solved the issue. Apart from hstore, I needed to drop ghstore as well. Thanks again From: Tom Lane To: Brian Trudal Cc: Bartosz Dmytrak ; "pgsql-general@postgresql.org" Sent: Tuesday, March 6, 2012 4:09 PM Subject: Re: [GENERAL] Sin

Re: [GENERAL] Single server multiple databases - extension

2012-03-06 Thread Brian Trudal
ension_versions WHERE name = 'hstore'; -[ RECORD 1 ]- name    | hstore version | 1.0 installed   | t superuser   | t relocatable | t schema  | requires    | comment | data type for storing sets of (key, value) pairs any other hints ? ____

Re: [GENERAL] Single server multiple databases - extension

2012-03-06 Thread Brian Trudal
Any one know how to install extensions to multiple databases in the same server ? Thanks in advance Brian From: Brian Trudal To: "pgsql-general@postgresql.org" Sent: Monday, March 5, 2012 4:52 PM Subject: Single server multiple databases - exten

[GENERAL] Single server multiple databases - extension

2012-03-05 Thread Brian Trudal
Hi I have 2 databases running in a single server; and I installed extension 'hstore' to one database and it works fine. When I tried to use the same extension in another database, it gives an error saying 'extension does not exist'; nor it allow to install as it complains about its existence.

Re: [GENERAL] Server hitting 100% CPU usage, system comes to a crawl.

2011-11-01 Thread Brian Fehrle
that point our number of backends to the cluster was at MAX 250, but generally in the 175 range, so well below our 400 max_connections we allow. So could this be the culprit? I'll be watching the cluster as we run on the new configuration (with only 200 max_connections). - Brian F On 10/27

  1   2   3   4   5   6   >