Re: [GENERAL] [HACKERS] Errors with run_build.pl - 8.3RC2

2008-01-22 Thread Andrew Dunstan
.org/mailman/listinfo/pgbuildfarm-members. cheers andrew ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread Andrew Sullivan
On Tue, Jan 29, 2008 at 04:24:05AM -0800, Glyn Astill wrote: > Hi chaps, > > I'm trying yo run a perl script that uses DBI (Slonys > psql_replication_check.pl to be precise) and I'm getting the error: > > Can't locate Pg.pm in @INC Pg.pm isn't DBI. It's the Pg Perl interface. A --

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread Andrew Sullivan
On Tue, Jan 29, 2008 at 08:14:28AM -0800, David Fetter wrote: > > I wouldn't trust that library or anything that depends on it if I were > you. It's been unmaintained for a *very* long time. Because code rusts when it's sitting around on a hard drive? Pg.pm doesn't get much attention, I agree,

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread Andrew Sullivan
On Tue, Jan 29, 2008 at 01:56:35PM -0500, A.M. wrote: > The postgresql from eight years ago is also quite rusty. No, it's not, which is my point. If you don't need any of the features you mention, and are aware of the limitations, there's nothing wrong with using it. The v2 protocol works, for i

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread Andrew Sullivan
On Tue, Jan 29, 2008 at 03:16:41PM -0500, A.M. wrote: > ...and Pg.pm includes a serious security hole in the form of non- > existent query escaping which will never be fixed. Are we really > discussing the semantics of "rust"? It has never done that escaping. No rust has occurred. This is a

[GENERAL] Any way to use refcursors from python?

2010-12-29 Thread Andrew Sullivan
rences. Have I completely overlooked something (there would be no news in that, of course)? Is there some other interface I ought to be using? Thanks, A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your sub

Re: [GENERAL] Any way to use refcursors from python?

2010-12-29 Thread Andrew Sullivan
t I really want. I'm exploring the performance consequences.) Thanks, A -- Andrew Sullivan a...@crankycanuck.ca -- 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] Restore problem

2010-12-30 Thread Andrew Sullivan
ord processor rather than a text editor, isn't it? A -- Andrew Sullivan a...@crankycanuck.ca -- 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] query stuck at SOCK_wait_for_ready function call

2010-12-31 Thread Andrew Sullivan
locks.html (or, for your release, http://www.postgresql.org/docs/8.1/interactive/view-pg-locks.html). By the way, the advice you got yesterday about upgrading is good advice. I wouldn't keep running the version you're running. A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pgsq

Re: [GENERAL] UUID column as pimrary key?

2011-01-05 Thread Andrew Sullivan
king these trade-offs still requires thought and analysis. It's exactly the kind of of analysis that professional paranoids like DBAs are for. A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subsc

Re: [GENERAL] UUID column as pimrary key?

2011-01-05 Thread Andrew Sullivan
y* paranoid about the > not-infinite-uniqueness of UUIDs when there are plenty of other risks > lurking around that also need erro checking. I fully agree with this. A -- Andrew Sullivan a...@crankycanuck.ca -- 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] UUID column as pimrary key?

2011-01-05 Thread Andrew Sullivan
eptable trade-off. A -- Andrew Sullivan a...@crankycanuck.ca -- 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] UUID column as pimrary key?

2011-01-05 Thread Andrew Sullivan
wouldn't be something people would pay any of us for. A -- Andrew Sullivan a...@crankycanuck.ca -- 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] Case Sensitivity

2011-01-13 Thread Andrew Sullivan
it's any more bodgy than a database-wide case insensitive collation. For instance, I can assure you that customers named Leblanc and LeBlanc care about whether those two compare equally. In your customer name field, if you have a database-wide collation setting, you can't make the di

[GENERAL] array_agg-like thing over arrays

2011-01-14 Thread Andrew Sullivan
int8, arrayofstuff text[]); SELECT item_id, array_agg(arrayofstuff) from eg1 WHERE class_id = 1; But this, of course, gives an ERROR: could not find array type for data type text[]. What am I missing, or have I just misremembered that this was ever possible? Thanks, A -- Andrew Sulli

Re: [GENERAL] array_agg-like thing over arrays

2011-01-14 Thread Andrew Sullivan
On Sat, Jan 15, 2011 at 01:35:20AM +0300, Dmitriy Igrishin wrote: > Try SELECT item_id, array_agg(arrayofstuff::text) from eg1 WHERE class_id = > 1; Doh! That's it. Thanks! A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pgsql-general mailing list (pgsql-general@postgre

Re: [GENERAL] Install PostgreSQL as part of a desktop application, but how to coop with existing installations?

2011-01-17 Thread Andrew Sullivan
ta needs to include a reference to the previous one in the chain. It's hard to yank one piece out without replacing everything that comes after it, so such an attack would be easier to detect. Not an impossible attack, just harder.) A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via p

Re: [GENERAL] Install PostgreSQL as part of a desktop application, but how to coop with existing installations?

2011-01-17 Thread Andrew Sullivan
r with no contention. Postgres is a bad fit for that. Use SQLite or one of the other things that target embedded use. A -- Andrew Sullivan a...@crankycanuck.ca -- 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] help understanding collation order

2011-01-17 Thread Andrew Sullivan
ms is not playing nice and complain to the OS vendor. A -- Andrew Sullivan a...@crankycanuck.ca -- 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] Installing Postgres with MS SQL Server 2005

2011-01-20 Thread Andrew Sullivan
? Well, you might find that they're contending for resources, and that neither one of them is especially co-operative when they're starved of the resource they want. But otherwise, I can't think of any reason it would. A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via

Re: [GENERAL] Re: Separating the ro directory of the DB engine itself from the rw data areas . . .

2011-01-28 Thread Andrew Sullivan
e $PGDATA environment variable. A -- Andrew Sullivan a...@crankycanuck.ca -- 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] Adding more space, and a vacuum question.

2011-01-30 Thread Andrew Sullivan
d by VACUUM as reusable > (not VACUUM FULL which restores it to the operating system) - can > its space ever be used by another table, or can it only be used for > new inserts into the same table? It's managed by postgres, but given your churn rate on these tables I'd be tempt

Re: [GENERAL] Question about switchover with PG9 replication

2011-02-07 Thread Andrew Sullivan
ying the whole database, no. A -- Andrew Sullivan a...@crankycanuck.ca -- 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] How to create index on only some of the rows

2011-02-07 Thread Andrew Sullivan
t; this? What are the criteria for inclusion in the index? Those would be the criteria you put in your WHERE clause. A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [HACKERS] [GENERAL] Issues with generate_series using integer boundaries

2011-02-08 Thread Andrew Dunstan
2 were to demonstrate that the changes don't affect existing functionality. My previous patch proposal (v2) caused these to return unexpected output. Isn't this all really a bug fix that should be backpatched, rather than a commitfest item? cheers andrew -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [HACKERS] [GENERAL] Issues with generate_series using integer boundaries

2011-02-08 Thread Andrew Dunstan
On 02/08/2011 08:19 PM, Itagaki Takahiro wrote: On Wed, Feb 9, 2011 at 10:17, Andrew Dunstan wrote: Isn't this all really a bug fix that should be backpatched, rather than a commitfest item? Sure, but we don't have any bug trackers... Quite right, but the commitfest manager i

Re: [GENERAL] disable triggers using psql

2011-02-16 Thread Andrew Sullivan
A -- Andrew Sullivan a...@crankycanuck.ca -- 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] disable triggers using psql

2011-02-16 Thread Andrew Sullivan
ing pg_restore all the data is loaded into all tables BEFORE any > constraints are created. I believe that if you did a data-only dump from > pg_dump you would have the same integrity problems. Yes. A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pgsql-general mailing list (pgsql-gen

Re: [GENERAL] Raid Controller Write Cache setting for WAL and Data

2011-02-16 Thread Andrew Sullivan
one goes to get that data, you'll run into a problem. A battery is one of the simplest and cheapest things you can do to make your database system more reliable and faster at the same time. A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pgsql-general mailing list (pgsql-general@p

Re: [GENERAL] Worst case scenario of a compromised non super-user PostgreSQL user account

2011-02-21 Thread Andrew Sullivan
I usually prefer to have two accounts: one owns the objects, and another that has INSERT/DELETE/UPDATE and so on permissions. If the application is creating tables, you might want to ask yourself why. Other than that, what others said. A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pgsq

Re: [GENERAL] Adding a column with constraint

2011-02-24 Thread Andrew Sullivan
of all the square brackets and such, but I encourage you to experiment with the manual open to see exactly what everything does. I haven't checked just this instant, but I think you can rename the constraint if you don't like its name. A -- Andrew Sullivan a...@crankycanuck.ca -- S

Re: [GENERAL] PG on two nodes with shared disk ocfs2 & drbd

2011-02-27 Thread Andrew Sullivan
On Sun, Feb 27, 2011 at 01:48:24PM +0100, Jasmin Dizdarevic wrote: > A drbd disk in dual primary mode with ocfs2-filesystem. > > Will there be any conflicts if using the shared volume as PGDATA directory? Yes. A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pgsql-general mai

Re: [GENERAL] PG on two nodes with shared disk ocfs2 & drbd

2011-02-27 Thread Andrew Sullivan
stly unhappy because, for that kind of coin, they would like it to work most of the time. I know at least one metronet deployment that didn't work even once for two years.) In the case of the MySQL stuff, there are some trade-offs in the design that make my heart sink. But maybe for t

Re: [GENERAL] PG on two nodes with shared disk ocfs2 & drbd

2011-02-27 Thread Andrew Sullivan
lion dollars a year, too, but barring magic I don't think it'll happen soon. Multi-master transactional ACID-type databases with multiple masters is very hard. A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] PG on two nodes with shared disk ocfs2 & drbd

2011-02-27 Thread Andrew Sullivan
cation systems. Slony is actually well-suited to this sort of thing, despite the overhead that it imposes. This is a matter of trade-offs, and you might want to think about different roles for different boxes -- especially since hardware is so cheap these days. A -- Andrew Sullivan a...@crankycanu

Re: [GENERAL] Lock ACCESS EXCLUSIVE and Select question !

2011-02-28 Thread Andrew Sullivan
resulting rows depending on whether you are in READ COMMITTED or SERIALIZABLE isolation mode, respectively. A -- Andrew Sullivan a...@crankycanuck.ca -- 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] Full Vacuum/Reindex vs autovacuum

2011-02-28 Thread Andrew Sullivan
how much vacuum full is recovering. I suggest this only so as not to disrupt your regular operations; otherwise, I'd suggest going back to autovacuum and seeing whether reindex alone would help you. A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pgsql-general mailing list (pgsql-gene

Re: [GENERAL] Lock ACCESS EXCLUSIVE and Select question !

2011-02-28 Thread Andrew Sullivan
, but in almost every case I've seen people do that it's from not understanding database trasactions. It's almost certainly the wrong thing. If you said more about what you're trying to do, maybe someone can help you. A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via

Re: [GENERAL] Lock ACCESS EXCLUSIVE and Select question !

2011-02-28 Thread Andrew Sullivan
e number of rows >0, which means you made a sale, or else 0 rows are affected (because some other transaction sold this seat at the same time). In the latter case, you have to try a new seat. Hope that helps, A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pgsql-general m

Re: [GENERAL] Lock ACCESS EXCLUSIVE and Select question !

2011-02-28 Thread Andrew Sullivan
On Mon, Feb 28, 2011 at 05:13:11PM -0500, Alan Acosta wrote: > I really appreciate your help Andrew, and yep, i already starto to feel some > pain lol. I suppose is true but is better to ask, SELECT FOR UPDATE is > faster than LOCK ? SELECT FOR UPDATE locks the row you're trying to

Re: [GENERAL] Lock ACCESS EXCLUSIVE and Select question !

2011-02-28 Thread Andrew Sullivan
be ensuring not to double-sell something if you don't have the list of inventory prior to its being sold. A -- Andrew Sullivan a...@crankycanuck.ca -- 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] Lock ACCESS EXCLUSIVE and Select question !

2011-03-01 Thread Andrew Sullivan
savepoint and try again with a different seat number. A -- Andrew Sullivan a...@crankycanuck.ca -- 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] Index question

2011-03-02 Thread Andrew Sullivan
? > CREATE INDEX? A -- Andrew Sullivan a...@crankycanuck.ca -- 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] updating all records of a table

2011-03-04 Thread Andrew Sullivan
n batches. You can run vacuums in between groups, so that the table doesn't get too bloated. Otherwise, yeah, you're better off to do some of the cleanup Joshua suggested. A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pgsql-general mailing list (pgsql-general@postgresql.

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Andrew Sullivan
on nvl(integer, integer) does not exist > LINE 1: select nvl(0,1); >^ > HINT: No function matches the given name and argument types. You might need > to add explicit type casts. Is the function in your search_path? A -- Andrew Sullivan a...@crankycanuck.ca -- Sent

Re: [GENERAL] Copying data from one table to another - how to specify fields?

2011-03-09 Thread Andrew Sullivan
ttp://www.postgresql.org/docs/9.0/interactive/sql-insert.html, but that example uses SELCT *. Perhaps an additional example would have helped? (This is basic SQL, though, and I'm not sure the keyword manual is the best place for such an example.) A -- Andrew Sullivan a...@crankycanuck.ca -

Re: [GENERAL] Transaction wraparound vacuum synchronicity

2011-03-09 Thread Andrew Sullivan
Too bad, that, because it seems to me that this is a use case where one might want to put a thumb on the scale, and having to twiddle a parameter just to affect one table is kind of user-unfriendly.) A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pgsql-general mailing list (pgsql-gene

Re: [GENERAL] FW: backup using pg_dump postgreSQL 8.3.8

2011-03-09 Thread Andrew Sullivan
you sure that's not your problem. (It always is for me, and I always make this mistake at least once per installation, even after many years.) A -- Andrew Sullivan a...@crankycanuck.ca -- 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] FW: backup using pg_dump postgreSQL 8.3.8

2011-03-09 Thread Andrew Sullivan
On Wed, Mar 09, 2011 at 10:31:56AM -0500, Tom Lane wrote: > Andrew Sullivan writes: > > On Wed, Mar 09, 2011 at 03:58:20PM +0200, Sandy Test wrote: > >> Unfortunately, even with the pg_hba.conf fix of adding host postgres ... > >> trust, > If it is askin

Re: [GENERAL] How do you change the size of the WAL files?

2011-03-11 Thread Andrew Sullivan
On Fri, Mar 11, 2011 at 12:44:24PM -0500, runner wrote: > 16 Mb is too small for our instalation. How do you know that? (I can think of cases where this is true, but it's rarer than you may think and it has some nasty side effects.) A -- Andrew Sullivan a...@crankycanuck.ca --

Re: [GENERAL] How do you change the size of the WAL files?

2011-03-11 Thread Andrew Sullivan
ll barely possible that it is. A -- Andrew Sullivan a...@crankycanuck.ca -- 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] Autocommit off - commits/rollbacks

2011-03-14 Thread Andrew Sullivan
something that you've done and then try something (and pursue alternatives depending on whether you get an error), use a savepoint. See http://www.postgresql.org/docs/9.0/interactive/tutorial-transactions.html A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pgsql-general maili

Re: [GENERAL] Move From Oracle DB to PostgreSQL DB

2011-03-14 Thread Andrew Sullivan
while it still has some sharp corners it works. A -- Andrew Sullivan a...@crankycanuck.ca -- 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] Enable/Disable Triggers

2011-03-15 Thread Andrew Sullivan
sions of slony, slony fooled with the system catalogues instead.) You can use the replication_role control to prevent triggers firing. A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] query taking much longer since Postgres 8.4 upgrade

2011-03-16 Thread Andrew Sullivan
10110','20110207','20110307' > ) > and course_delivery LIKE 'O%' > and course_cross_section IS NULL > ) > and user_id not in (select user_id from instr_as_stutemp) > > (table instr_as_stutemp has just one column and only 4 rows)

Re: [GENERAL] postgres conferences missing videos?

2011-03-22 Thread Andrew Sullivan
ider making it a high priority for yourself. This is a community project, so if you think this is an important thing from which the community could benefit, you could volunteer to make it happen. Best regards, A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pgsql-general mailin

Re: [GENERAL] RAID 1 - drive failed - very slow queries even after drive replaced

2011-03-23 Thread Andrew Sullivan
Right Features once its compatibility mode has been turned off. (This is at least true in my experience. Not saying it's the cause of the present issue, though.) A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make chan

Re: [GENERAL] pdf saving into DB vs. saving file location ?

2011-03-23 Thread Andrew Sullivan
f the transaction. If you put it on the filesystem, you have to manage that yourself. A -- Andrew Sullivan a...@crankycanuck.ca -- 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] forums.postgresql.com.au

2011-04-06 Thread Andrew Sullivan
n was "mostly, they weren't". I have pretty serious doubts you're going to do better. Why do these two completely different styles of interaction need to be merged anyway? I think adding forum traffic to the mailing list will be yet another way to make the lists less u

Re: [GENERAL] forums.postgresql.com.au

2011-04-06 Thread Andrew Sullivan
but it opens a pinhole between the two interaction styles instead of trying to make two incommensurable styles of interaction commensurate. I don't feel strongly about any of this, note, and I'm sure not willing to do any work. I'm merely observing that there are at least spokes of this wheel t

Re: [GENERAL] temp tables not dropping at end of script

2011-04-06 Thread Andrew Sullivan
stop your connection? This sounds like under 8.0 you were closing the connection (thereby ending a session), but that under 8.4 your connection isn't actually closing (so your session remains open, so the temp table hangs around). A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via

Re: [GENERAL] Auto Adjust Age

2011-04-06 Thread Andrew Sullivan
x27; from age(CURRENT_TIMESTAMP,dob)) as age . . . FROM users . . . By and large, it's not a good idea to store something you can calculate from other data you have. A -- Andrew Sullivan a...@crankycanuck.ca -- 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] temp tables not dropping at end of script

2011-04-06 Thread Andrew Sullivan
om the command > line. Other than putting a quit inside a cfquery tag? Is it possible that the older driver closed automatically? Anyway, you could set a savepoint, try to create the temp table, and then rollback to savepoint if it doesn't work or else continue if it does. A

Re: [GENERAL] Protecting stored procedures

2011-04-07 Thread Andrew Sullivan
n that probably won't solve everything. A -- Andrew Sullivan a...@crankycanuck.ca -- 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] Protecting stored procedures

2011-04-07 Thread Andrew Sullivan
n > understand what they have if they were able to is slim. So you aren't afraid your users are going to take this code, but you want to put (relatively meaningless) protection in place anyway? I guess maybe the security definer functions might help you. A -- Andrew Sulliva

Re: [GENERAL] why autocommit mode is slow?

2011-04-08 Thread Andrew Sullivan
hat so slow? If you do BEGIN; [statement]; COMMIT; one after another, is that as slow as autocommit? (My bet is yes.) A -- Andrew Sullivan a...@crankycanuck.ca -- 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] Adding a default value to a column after it exists

2011-04-13 Thread Andrew Sullivan
AULT expression (see http://www.postgresql.org/docs/9.0/interactive/sql-altertable.html) Note that this doesn't actually update the fields that are NULL in the column already. For that, once you had the default in place, you could do UPDATE table SET column = DEFAULT WHERE column IS NULL

Re: [GENERAL] Streaming Replication limitations

2011-04-13 Thread Andrew Sullivan
for the back end, and those two platforms are binary incompatible. The manual actually warns about this. A -- Andrew Sullivan a...@crankycanuck.ca -- 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] Trigger to convert UNIX time to timestamp without time zone.

2014-06-06 Thread Andrew Sullivan
probably don't need a trigger, just put that in your query. Are you sure you want this without time zone? In my experience, almost every time people think they want "without time zone" they actually don't. A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pgsql-gen

Re: [GENERAL] Replacing a production db

2014-06-18 Thread Andrew Sullivan
ation running at the same time), what you really want to do us use the schema (or namespace) support in Postgres. Be careful with this, however, as it is easy to make a system so convoluted that nobody can understand it. A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pgsql-general maili

Re: [GENERAL] Alternative to psql -c ?

2014-06-25 Thread Andrew Sullivan
ll > not have the desired effects." Hmm. I've _used_ transactions in such files, I'm pretty sure. You don't need the --single-transaction setting for this, just do the BEGIN; and COMMIT; yourself. A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pgsql-general ma

Re: [GENERAL] Alternative to psql -c ?

2014-06-25 Thread Andrew Sullivan
On Wed, Jun 25, 2014 at 03:37:11PM +0100, James Le Cuirot wrote: > Sorry, you're missing the point. I'm trying not to alter the existing > behaviour of the Chef database cookbook Ah, got it. Sorry, I'm clueless. No, I don't think I have a suggestion, then.

[GENERAL] Petition: Treat #!... shebangs as comments

2014-07-18 Thread Andrew Pennebaker
-- Cheers, Andrew Pennebaker www.yellosoft.us

Re: [GENERAL] Petition: Treat #!... shebangs as comments

2014-07-18 Thread Andrew Pennebaker
to use a traditional (#!/usr/bin/env psql -f) shebang. It took a few hours on irc to hack this one together. On Fri, Jul 18, 2014 at 2:28 PM, Martin Gudmundsson < martingudmunds...@gmail.com> wrote: > > 18 jul 2014 kl. 17:31 skrev Dennis Jenkins : > > On Fri, Jul 1

Re: [GENERAL] check database integrity

2014-07-20 Thread Andrew Sullivan
r is it that you are somehow trying to prove that what you have on the target (backup) machine is in fact production-ready? I guess I don't really understand what you are trying to do. A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pgsql-general mailing list (pgsql-general@postgresq

[GENERAL] Pass where clause to a function

2014-08-13 Thread Andrew Bartley
Hi all, Is it possible to create a view or foreign table that will do something like this select * from table_x where x_id = 10; passing the where "x_id = 10" to a function sorta like this select * from api_function('x = 10') or select * from api_function(10) passing the result set back to

Re: [GENERAL] Pass where clause to a function

2014-08-13 Thread Andrew Bartley
type predicates that can be written at the top level of the query... But that is ok, we can work with the restrictions. I also understand I may have overs simplified the question. So I hope I did not waste your time Thanks again Andrew On 14 August 2014 15:20, John R Pierce wrote: > On 8

Re: [GENERAL] Mimicking Oracle SYSDATE

2014-08-19 Thread Andrew Sullivan
On Tue, Aug 19, 2014 at 07:41:00PM +0530, Sameer Thakur wrote: > We are thinking of building our own version of Oracle's sysdate, in > the form of PostgreSQL extension. I thought that was the point of the statement_timestamp() function? A -- Andrew Sullivan a...@crankycanuck.ca -

[GENERAL] LOADing functions

2014-10-31 Thread Andrew Becker
Hi - I seem to be unable to reLOAD a shared library within the session that I LOADed it. I am developing a UDF and my debugging changes do not appear to take until I quit psql and restart. The following code sequence demonstrates the issue |kbmod=# CREATE OR REPLACE FUNCTION hello(TEXT) RET

[GENERAL] Re: [HACKERS] COPY TO returning empty result with parallel ALTER TABLE

2014-11-04 Thread Andrew Dunstan
a SELECT will acquire its execution snapshot after it's gotten AccessShareLock on the table. Arguably COPY should behave likewise. Or to be even more concrete, COPY (SELECT * FROM tab) TO ... probably already acts like he wants, so why isn't plain COPY equivalent to that? Yes, that seems like a

Re: [GENERAL] Strange behavior in generate_series(date, date, interval) with DST

2014-12-07 Thread Andrew Sullivan
self with those time changes. It makes debugging easier, particularly because the time change only happens twice a year so nobody _ever_ thinks of it when troubleshooting. Best regards, A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pgsql-general mailing list (pgsql-general@postgresql

Re: [GENERAL] Hostnames, IDNs, Punycode and Unicode Case Folding

2014-12-29 Thread Andrew Sullivan
A2003 and then punycode-decoding it doesn't always result in the same label. See my other message. Did I mention that IDNA is a mess? A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] Hostnames, IDNs, Punycode and Unicode Case Folding

2014-12-29 Thread Andrew Sullivan
ode encoded label, no leading or trailing > hyphens > on a label, etc. You seem to want a bunch of label constraints, not all of which are related to IDNA. I think it would be better to break these up into a small number of functions. As it happens, I have a colleague at Dyn who I think

Re: [GENERAL] Hostnames, IDNs, Punycode and Unicode Case Folding

2014-12-29 Thread Andrew Sullivan
under IDNA2008. A -- Andrew Sullivan a...@crankycanuck.ca -- 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] Hostnames, IDNs, Punycode and Unicode Case Folding

2014-12-29 Thread Andrew Sullivan
that many people are using for IDNA2008: <https://gitorious.org/libidn2/libidn2/source/0d6b5c0a9f1e4a9742c5ce32b6241afb4910cae1:> It's GPLv3, though, which brings its own issues. A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pgsql-general mailing list (pgsql-general@

Re: [HACKERS] [GENERAL] ON_ERROR_ROLLBACK

2014-12-30 Thread Andrew Dunstan
bering this thread. So there's a field report :-) +0.75 for backpatching (It's hard to imagine someone relying on the bad behaviour, but you never know). cheers andrew -- 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] #Personal#: Reg: Multiple queries in a transaction

2015-02-19 Thread Andrew Sullivan
SAVEPOINT foo; Q2; if error then ROLLBACK; These both work. The problem is, I think, that you have different rules for "when Q2 fails", and without knowing your exact circumstances I suspect we can't say much more. Indeed, however, it sounds to me like you think these are in the same wor

Re: [GENERAL] express composite type literal as text

2015-02-22 Thread Andrew Sullivan
s dramatically reduced the number of such cases. Some convenience was lost (I still get tripped up from time to time, but I'm not doing Pg work every day), but the overall reliability of things was increased. So I'd say it's probably not a bug. A -- Andrew Sullivan a...@crankyc

Re: [GENERAL] "JSON does not support infinite date values"

2015-02-26 Thread Andrew Dunstan
eathe slowly in, and out, in, and out. It looks to me like ab14a73a6ca5cc4750f0e00a48bdc25a2293034a copied too much code from xml.c - including a comment about XSD... Andrew, was that intentional? Possibly too much was copied, I don't recall a reason offhand for excluding infinity. I'

Re: [GENERAL] "JSON does not support infinite date values"

2015-02-26 Thread Andrew Dunstan
onstraints" - breathe slowly in, and out, in, and out. It looks to me like ab14a73a6ca5cc4750f0e00a48bdc25a2293034a copied too much code from xml.c - including a comment about XSD... Andrew, was that intentional? Not wanting to put words in Andrew's mouth, but I thought the point of those changes

Re: [GENERAL] "JSON does not support infinite date values"

2015-02-26 Thread Andrew Dunstan
use-cases. So +1 for removing the error and emitting "infinity" suitably quoted. Andrew, will you do that? Yeah. cheers andrew -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresq

Re: [GENERAL] "JSON does not support infinite date values"

2015-02-26 Thread Andrew Dunstan
we'll output it. But we're not going to silently convert infinity to anything else: andrew=# select to_json('9-12-31'::timestamptz); to_json -- "9-12-31T00:00:00-05:00" cheers andrew -- Sent via pgsql-

Re: [GENERAL] Best method to compare subdomains

2013-01-16 Thread Andrew Sullivan
of ASCII.) You can, of course, also force the labels to be only LDH-labels. Best, A -- Andrew Sullivan a...@crankycanuck.ca -- 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] DB alias ?

2013-01-23 Thread Andrew Sullivan
e, but that's a different discussion.) Best, A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] var/log/postgresql deletion mystery Ubuntu 12.10

2013-02-08 Thread Andrew Taylor
Hi, I have to create this directory each time I want to start the server. Something is deleting it when I close down or start up my laptop. Any suggestions as to what could be doing this, or how I could find out? I presently have version 9.1 installed. All I can add is "it used to work!". Since

Re: [GENERAL] var/log/postgresql deletion mystery Ubuntu 12.10

2013-02-10 Thread Andrew Taylor
eb 8, 2013 at 11:43 PM, Tom Lane wrote: > Andrew Taylor writes: > > I have to create this directory each time I want to start the server. > > Something is deleting it when I close down or start up my laptop. > > > Any suggestions as to what could be doing this, or how I

Re: [GENERAL] fascinating article on postgresql mailing lists

2013-02-11 Thread Andrew Satori
On Feb 11, 2013, at 2:17 PM, "Daniel Verite" wrote: > Vincent Veyron wrote: > >> I find it strange that >> >> 'Probability that a new thread gets a response' >> >> sits below 60% for the 'general' list > > This seems indeed too low. > > I happen to collect these messages in a databa

[GENERAL] Importing 120 csv files bulk multiple

2013-02-12 Thread Andrew Taylor
Hi, As per title I need to import a load of csv files. So I wrote a bash script to generate the statements I needed (attached). However, this is failing on my ubuntu laptop - it seems to occasionally miss the semicolon to execute. What I did was copy the text to clipboard and paste it in to bash.

Re: [GENERAL] Importing 120 csv files bulk multiple

2013-02-12 Thread Andrew Taylor
Awesome, thanks! On Tue, Feb 12, 2013 at 3:35 PM, Adrian Klaver wrote: > On 02/12/2013 07:14 AM, Andrew Taylor wrote: > >> Hi, >> >> As per title I need to import a load of csv files. So I wrote a bash >> script to generate the statements I needed (attached). How

[GENERAL] ERROR: relative path not allowed for COPY to file

2013-02-12 Thread Andrew Taylor
Hi, I must be being thick - can anyone tell me what I'm doing wrong? postgres=# COPY post_e_n postgres-# TO 'usr/local/psql/csv/post_e_n.csv' postgres-# WITH DELIMITER ',' postgres-# CSV HEADER; ERROR: relative path not allowed for COPY to file COPY (SELECT * FROM post_e_n) gave me the same err

<    1   2   3   4   5   6   7   8   9   10   >