[GENERAL] Disable Postgresql startup on boot (Windows XP)

2011-01-04 Thread Ken
? Thanks. Ken -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [SQL] Re: [GENERAL] Link Office Word form document with data from PostgreSQL

2015-03-30 Thread Ken Tanzer
ugins/opentbs/demo/demo.html). We used it to replace some homegrown code similar to what Vincent described that directly manipulated the document. There are enough idiosyncracies among the file formats that I've been much happier using the TBS code. I think this is especially true if yo

[GENERAL] EXCLUDE, Gist and integers

2015-07-15 Thread Ken Tanzer
st way to make this work? Thanks in advance! Ken -- AGENCY Software A Free Software data system By and for non-profits *http://agency-software.org/ <http://agency-software.org/>* *https://agency-software.org/demo/client <https://agency-software.org/demo/client>* ken.tan...@agency-softw

Re: [GENERAL] EXCLUDE, Gist and integers

2015-07-15 Thread Ken Tanzer
On Wed, Jul 15, 2015 at 10:03 PM, Guillaume Lelarge wrote: > Hi, > > Le 16 juil. 2015 2:23 AM, "Ken Tanzer" a écrit : > > > > Hi. I'm looking into adding daterange exclusions to some of my tables. > Following the documentation, I can do this no problem to

Re: [GENERAL] Count of non-null values per table column

2015-08-14 Thread Ken Tanzer
L: \set my_table my_real_table_name SELECT 'SELECT COUNT(*) AS total_rows, '||array_to_string(array(SELECT 'COUNT('||column_name::text ||') AS ' || column_name::text FROM information_schema.columns WHERE table_name=:'my_table'),E',\n') || ' FR

[GENERAL] Very puzzling sort behavior

2015-09-10 Thread Ken Tanzer
t what's going on, what to do about it, or what obvious point I missing? Thanks in advance! my_db=> SELECT version(); version -------- PostgreSQL

Re: [GENERAL] Very puzzling sort behavior

2015-09-10 Thread Ken Tanzer
Alright never mind, I guess I see what's going on. Thanks! Ken On Thu, Sep 10, 2015 at 12:51 PM, Ken Tanzer wrote: > > > On Thu, Sep 10, 2015 at 12:47 PM, Tom Lane wrote: > >> Peter Geoghegan writes: >> > On Thu, Sep 10, 2015 at 12:35 PM, Ken Tanzer &g

Re: [GENERAL] Very puzzling sort behavior

2015-09-10 Thread Ken Tanzer
On Thu, Sep 10, 2015 at 12:47 PM, Tom Lane wrote: > Peter Geoghegan writes: > > On Thu, Sep 10, 2015 at 12:35 PM, Ken Tanzer > wrote: > >> Any thoughts about what's going on, what to do about it, or what > obvious point I missing? Thanks in advance! > > >

Re: [GENERAL] Very puzzling sort behavior

2015-09-10 Thread Ken Tanzer
On Thu, Sep 10, 2015 at 12:56 PM, Peter Geoghegan < peter.geoghega...@gmail.com> wrote: > On Thu, Sep 10, 2015 at 12:51 PM, Ken Tanzer wrote: > > OK, can one of you help me out in understanding this? I would have > thought that given "CLARK," and "CLARKE&q

Re: [GENERAL] Very puzzling sort behavior

2015-09-10 Thread Ken Tanzer
On Thu, Sep 10, 2015 at 2:02 PM, Alvaro Herrera wrote: > Ken Tanzer wrote: > > > Are there any other potential solutions, pitfalls or considerations that > > come to mind? Any thoughts welcome. And as I said, if there's not a > good > > way to do this I'll

Re: [GENERAL] Very puzzling sort behavior

2015-09-10 Thread Ken Tanzer
On Thu, Sep 10, 2015 at 3:03 PM, Andrew Sullivan wrote: > On Thu, Sep 10, 2015 at 02:54:31PM -0700, Ken Tanzer wrote: > > Thanks, but I guess I should have been clearer. Thanks to y'all > wonderful > > mailing list folks, I get it now as to why the two sorts are not the

[GENERAL] interperting type oid in C code

2015-10-19 Thread Ken Been
I'm working on a foreign data wrapper and I want to switch based on the column type. Specifically, if the column type in the external table is the same as in the (locally defined) foreign table then I can get some speedup for some types. Through the ForeignScanState object I can get TupleDesc and

Re: [GENERAL] interperting type oid in C code

2015-10-19 Thread Ken Been
n, Oct 19, 2015 at 2:36 PM, Ken Been wrote: > >> I'm working on a foreign data wrapper and I want to switch based on the >> column type. Specifically, if the column type in the external table is the >> same as in the (locally defined) foreign table then I can get some spe

Re: [GENERAL] interperting type oid in C code

2015-10-19 Thread Ken Been
Those are more complicated, and it's not obvious to me how to use them. I really think that all I need is something as simple as "if (my_oid == INT4OID) {...}". Is there any reason why I shouldn't just do that? On Mon, Oct 19, 2015 at 7:08 PM, Alvaro Herrera wrot

Re: [GENERAL] interperting type oid in C code

2015-10-19 Thread Ken Been
Well, it's a few types, but the logic is different for each one, so they have to be handled independently anyway. On Mon, Oct 19, 2015 at 7:40 PM, Alvaro Herrera wrote: > Ken Been wrote: > > Those are more complicated, and it's not obvious to me how to use them. > I >

[GENERAL] carray_to_bytea?

2015-10-22 Thread Ken Been
I'd like to propose a carray_to_bytea function, similar to cstring_to_text_with_len, declared in src/include/utils.h and implemented in src/backend/utils/adt/varlena.c. The implementation would be the same as cstring_to_text_with_len, but with a different return type. I have put the implementatio

Re: [GENERAL] carray_to_bytea?

2015-10-22 Thread Ken Been
On Thu, Oct 22, 2015 at 4:12 PM, Tom Lane wrote: > Ken Been writes: > > I'd like to propose a carray_to_bytea function, similar to > > cstring_to_text_with_len, declared in src/include/utils.h and implemented > > in src/backend/utils/adt/varlena.c. The implementatio

Re: [GENERAL] carray_to_bytea?

2015-10-22 Thread Ken Been
at 5:16 PM, Jim Nasby wrote: > On 10/22/15 12:13 PM, Ken Been wrote: > >> My input is a byte array with a length. >> I can't assume zero-termination for varchar fields, so >> cstring_to_text_with_len >> is exactly what I need for those. For varbinary (i.e., byte

[GENERAL] Converting Postgres SQL constraint logic to PHP?

2016-06-10 Thread Ken Tanzer
;ROI'::character varying, 'MEDIA'::character varying])::text[] So anyway, there's my issue. Any thoughts/comments/suggestions welcome. Thanks in advance! Ken -- AGENCY Software A Free Software data system By and for non-profits *http://agency-software.org/ <htt

Re: [GENERAL] Converting Postgres SQL constraint logic to PHP?

2016-06-10 Thread Ken Tanzer
ese might be best, and particularly for Postgres? Thanks for the suggestions! Ken > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- AGENCY Software A Free Softwar

Re: [GENERAL] Converting Postgres SQL constraint logic to PHP?

2016-06-10 Thread Ken Tanzer
On Fri, Jun 10, 2016 at 1:54 PM, rob stone wrote: > > Hi Ken, > > Would this be static or dynamic? > For example, if you altered a column to become defined as NOT NULL, > say, when you build the form used to maintain that table you'd like to > have a "required&quo

Re: [GENERAL] Converting Postgres SQL constraint logic to PHP?

2016-06-15 Thread Ken Tanzer
On Fri, Jun 10, 2016 at 2:23 PM, Ken Tanzer wrote: > On Fri, Jun 10, 2016 at 1:47 PM, Steve Atkins wrote: > >> > You could look at one of the existing SQL parsers implemented in PHP, and >> use those to parse the constraint to a tree from which you could easily >>

[GENERAL] How to assemble all fields of (any) view into a string?

2016-09-07 Thread Ken Tanzer
on_schema, and use that info to assemble and return the string. But it looks like TCL functions won't accept a record as an argument. Any suggestions or advice most welcome. Thanks! Ken -- AGENCY Software A Free Software data system By and for non-profits *http://agency-software.org/ <

Re: [GENERAL] How to assemble all fields of (any) view into a string?

2016-09-07 Thread Ken Tanzer
On Wed, Sep 7, 2016 at 1:22 PM, Adrian Klaver wrote: > On 09/07/2016 01:15 PM, Ken Tanzer wrote: > >> Hi. Using version 9.2. I'm trying to create a function that will take >> a record from any view and assemble it into a string, for export to >> another sy

Re: [GENERAL] How to assemble all fields of (any) view into a string?

2016-09-07 Thread Ken Tanzer
On Wed, Sep 7, 2016 at 3:18 PM, Adrian Klaver wrote: > On 09/07/2016 01:36 PM, Ken Tanzer wrote: > >> >> >> On Wed, Sep 7, 2016 at 1:22 PM, Adrian Klaver > <mailto:adrian.kla...@aklaver.com>> wrote: >> >> On 09/07/2016 01:15 PM, Ken Tanzer w

Re: [GENERAL] How to assemble all fields of (any) view into a string?

2016-09-07 Thread Ken Tanzer
On Wed, Sep 7, 2016 at 3:46 PM, Adrian Klaver wrote: > On 09/07/2016 03:32 PM, Ken Tanzer wrote: > >> >> >> On Wed, Sep 7, 2016 at 3:18 PM, Adrian Klaver > <mailto:adrian.kla...@aklaver.com>> wrote: >> >> On 09/07/2016 01:36 PM, Ken Tanzer wro

Re: [GENERAL] How to assemble all fields of (any) view into a string?

2016-09-07 Thread Ken Tanzer
On Wed, Sep 7, 2016 at 3:38 PM, Jim Nasby wrote: > On 9/7/16 5:32 PM, Ken Tanzer wrote: > >> SELECT my_cat(ebh_gain,'ebh_gain') FROM ebh_gain; >> >> I know TCL and probably Python and others can work with a record as a >> trigger function. But T

Re: [GENERAL] How to assemble all fields of (any) view into a string?

2016-09-08 Thread Ken Tanzer
On Wed, Sep 7, 2016 at 4:39 PM, Adrian Klaver wrote: > On 09/07/2016 04:25 PM, Jim Nasby wrote: > >> On 9/7/16 6:07 PM, Ken Tanzer wrote: >> >>> ERROR: PL/Python functions cannot accept type record >>> >> >> Ugh, yeah... that won't work. p

Re: [GENERAL] How to assemble all fields of (any) view into a string?

2016-09-08 Thread Ken Tanzer
On Wed, Sep 7, 2016 at 4:31 PM, John R Pierce wrote: > On 9/7/2016 1:36 PM, Ken Tanzer wrote: > >> No transformation is needed, except for padding the fields out to their >> maximum lengths. >> > > without accessing metadata, how would you know what those maximum le

Re: [GENERAL] isnull() function in pgAdmin3

2016-10-03 Thread Ken Tanzer
list, for which I am abundantly grateful. In light of that, I offer the following "translations," which are specifically in response to your question about emulating the SQL above: and (isnull(`s`.`Actual_Close_Date`) --> and (`s`.`Actual_Close_Date` IS NULL) ((isnull(`s`.`Fundi

[GENERAL] Generate PG schemas from the Oracle Data Modeler tool?

2016-02-24 Thread Ken Winter
m actual Oracle databases and implement them as schemas in actual PG databases. What I need is more modest than that: a tool that inputs a file of DDL from the Oracle Data Modeler tool and outputs that DDL in PG syntax. ~ Thanks for any leads you can provide ~ Ken

Re: [GENERAL] Generate PG schemas from the Oracle Data Modeler tool?

2016-03-08 Thread Ken Winter
this weirdness, see http://stackoverflow.com/questions/35809963/cant-see-postgresql-public-schema-in-oracle-sql-developer. Any advice from the PG world would be very welcome. ~ Thanks, Ken On Wed, Feb 24, 2016 at 10:52 PM, Ken Winter wrote: > The best affordable (in this case, free) data modeli

[GENERAL] Suppress decimal point like digits in to_char?

2016-03-13 Thread Ken Tanzer
Hi. Is there a way with to_char to suppress a decimal point, like a leading or trailing 0, so that integers will not have them, but non-ints will? I'm hoping I'm missing something easy. Thanks. Ken SELECT val,to_char(val::decimal(6,2),'FM999,999D99') FROM ( SELECT 1 AS v

Re: [GENERAL] Suppress decimal point like digits in to_char?

2016-03-13 Thread Ken Tanzer
On Mar 13, 2016 6:29 PM, "David G. Johnston" wrote: > > On Sunday, March 13, 2016, Ken Tanzer wrote: >> >> Hi. Is there a way with to_char to suppress a decimal point, like a leading or trailing 0, so that integers will not have them, but non-ints will? I'm

Re: [GENERAL] Suppress decimal point like digits in to_char?

2016-03-14 Thread Ken Tanzer
On Mon, Mar 14, 2016 at 8:22 AM, David G. Johnston < david.g.johns...@gmail.com> wrote: > On Mon, Mar 14, 2016 at 3:31 AM, Francisco Olarte > wrote: > >> Hi; >> >> On Mon, Mar 14, 2016 at 2:53 AM, David G. Johnston >> wrote: >> &

Re: [GENERAL] Suppress decimal point like digits in to_char?

2016-03-14 Thread Ken Tanzer
y just leave it as a number and case it to the desired (fixed) number of decimals. And as we've touched on, it may just be different use cases colliding! :) Cheers, Ken -- AGENCY Software A Free Software data system By and for non-profits *http://agency-software.org/ <http://agency-so

[GENERAL] Aborted pg_dump run empties existing archive file

2016-05-26 Thread Ken Winter
I just discovered that a run of pg_dump that gets aborted empties any pre-existing backup file of the same name. It happens whether the run was deliberately canceled by the user or just failed because of a bad password (as in the example below). ~/dba$ pg_dump --host=localhost -U ken --format=c

[GENERAL] show connection limit?

2007-08-29 Thread Ken . Colson
I have set the connection limit of a user with the ALTER ROLE command in 8.1. Is there a way to see what the connection limit is set to for various users? Thanks, Ken

Re: [GENERAL] Data Warehousing

2007-09-04 Thread Ken . Colson
nt to consider is dblink from contrib. We have a similar situation for the archiving of collected data and have been able to implement a fairly easy solution that does not require the parsing of dump files, just a simple(ish) query based on the time inserted. -Ken ---

[GENERAL] Problem dropping table

2007-09-18 Thread Ken Logan
We are using postgresql 8.2.3 with slony1 1.2.8 and we're having problems trying to drop a table on the slony1 secondary that was sucessfully dropped on the master database. I'm sure this is just because I'm missing something, but it doesn't seem like there should be any reason the table cannot b

Re: [GENERAL] Problem dropping table

2007-09-18 Thread Ken Logan
On Tue, 2007-09-18 at 11:10 -0700, Alan Hodgson wrote: > On Tuesday 18 September 2007 10:30, Ken Logan <[EMAIL PROTECTED]> wrote: > > When we try to drop the table we get the error: > > ERROR: "member_pkey" is an index > > You have to remove the table from

Re: [GENERAL] good sql tutorial

2007-10-04 Thread Ken . Colson
Scott Marlowe wrote: > On 10/4/07, Geoffrey <[EMAIL PROTECTED]> wrote: >> Anyone have a recommendation for a good sql tutorial? Looking for a >> book, but online would be useful as well. > > I'd recommend The Art of SQL and Joel Celko's books. None are online > that I know of, but they're afford

[GENERAL] downloading and installing postgreSQL

2007-10-17 Thread Ken Johansson
Im installing the latest software ( postgresql-8.2.5-1-binaries-no-installer.) on windows xp but i dont know what file to click to install - this seems very ambiguous. Can anyone help? -- Ken

Re: [GENERAL] downloading and installing postgreSQL

2007-10-17 Thread Ken Johansson
Great, thanks. Is this the appropriate place to ask those types of support questions? Well, any type of support questions? thanks Ken On 17/10/2007, Guy Rouillier <[EMAIL PROTECTED]> wrote: > > Ken Johansson wrote: > > Im installing the latest software ( > > postgr

[GENERAL] running postgres

2007-10-18 Thread Ken Johansson
and i though PostgreSQL would be easier to get up and running than SQL server -- Ken

Re: [GENERAL] running postgres

2007-10-18 Thread Ken Johansson
Hello, Sorry everyone for the stupid rant. Wont happen again. And thanks for offer assistance. I seem to have it running and once i have a valid question ill post it. Sorry again.. Ken On 18/10/2007, brian <[EMAIL PROTECTED]> wrote: > > Ken Johansson wrote: > > and i

[GENERAL] How to uninstall the geometry package?

2007-11-12 Thread Ken Winter
y never use junking up my installation. The install was from the Win installer package postgresql-8.1.msi. My question is: Is there any setup routine or something that I can run to get rid of all the geometry objects, or is the only way to do this to completely uninstall and reinstall PostgreSQL? ~ TIA ~ Ken

[GENERAL] RETURNING clause: how to specifiy column indexes?

2007-12-11 Thread Ken Johanson
should be implemented anyway. Thanks, Ken ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] RETURNING clause: how to specifiy column indexes?

2007-12-12 Thread Ken Johanson
;(b,a)" part. In any case it's not clear this is the same thing Ken is complaining about ... I am only seeking to have the columns returned in the order they appear naturally. JDBC says "This array contains the indexes of the columns in the target table that contain the auto-g

Re: [GENERAL] RETURNING clause: how to specifiy column indexes?

2007-12-12 Thread Ken Johanson
legant approach, like?: INSERT... RETURNING (PG_LIST_KEYS(tblname)) I looked but did not find such a utility. It seems that such function would be best implemented in the server instead of in a driver (eg. having hardcoded subquery to the schema). Ken ---(e

Re: [GENERAL] RETURNING clause: how to specifiy column indexes?

2007-12-12 Thread Ken Johanson
imited value of getGeneratedKeys by index makes me think my time would be better spent elsewhere on the JDBC driver. For now at least. If you can respond to my earlier query (5 Dec) about what robustness improvements are needed, I'll start there.. Thanks, Ken

Re: [GENERAL] RETURNING clause: how to specifiy column indexes?

2007-12-13 Thread Ken Johanson
BY ordinal_position Ken ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] RETURNING clause: how to specifiy column indexes?

2007-12-13 Thread Ken Johanson
Kris Jurka wrote: Using pg_catalog tables is better than using information_schema because of the way permissions work. For information_schema you must be the table owner, while people who only have permissions to access a table will most likely be able to read pg_catalog. Do you have an

[GENERAL] Problem with pg_dump?

2008-01-04 Thread Ken Winter
" command. However, if no one else in PostgreSQL-land has encountered this problem, presumably it is a bug in PGLA, not in pg_dump, and I will take my problem there.) If it is a pg_dump bug, are there plans to fix it? And, meanwhile, any workarounds other than manually editing t

Re: [GENERAL] Problem with pg_dump?

2008-01-04 Thread Ken Winter
Everything I'm doing involves only 8.1. I don't have any 8.2 instances at all... Oops, just I just got a message from my tool's developer that the tool uses the 8.2 pg_dump no matter what actual PostgreSQL version it's working on. Sigh. ~ Thanks ~ Ken > -Origi

[GENERAL] Query to get column-names in table via PG tables?

2008-01-09 Thread Ken Johanson
table_schema=? AND table_name=? ORDER BY ordinal_position I need this to lookup the column names and their ordinal position for a given table (implementing a driver call). Thanks in advance, Ken ---(end of broadcast)--- TIP 6: explain analyze is your

Re: [GENERAL] Query to get column-names in table via PG tables?

2008-01-09 Thread Ken Johanson
he indexes, and append a RETURNING clause. Inefficient but the only strategy I know of. I wont argue if this API is somewhat dubious in ordinary applications, but the interface requires it be implemented anyway. Ken ---(end of broadcast)---

[GENERAL] What pg_restore does to a non-empty target database

2008-01-13 Thread Ken Winter
rchive is in compressed format. I don't know how different the story would be if the archive were in a different format. ~ TIA ~ Ken Given a pg_restore command (possibly filtered and reordered by a ToC file), where: * A is the source archive file (as filtered and reordered by the ToC f

Re: [GENERAL] What pg_restore does to a non-empty target database

2008-01-14 Thread Ken Winter
f the story below that is a lot more qualified and complicated. As before, I solicit your confirmations, corrections, and additions of this document, hoping to get it to the point where my project team (and anyone else who wants it) can use it with confidence. ~ Thanks ~ Ken --

Re: [GENERAL] Query to get column-names in table via PG tables?

2008-01-14 Thread Ken Johanson
make it most durable across server versions would be a benefit (assuming the underlying tables change?). Thank you, Ken ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if

Re: [GENERAL] Query to get column-names in table via PG tables?

2008-01-15 Thread Ken Johanson
Tino Wildenhain wrote: Ken Johanson wrote: I am looking for expertise on how to program the equivalent to this query, but using the pg_catalog tables, which I understand have fewer security restrictions than information_schema in some cases: SELECT column_name FROM information_schema.columns

Re: [GENERAL] Query to get column-names in table via PG tables?

2008-01-15 Thread Ken Johanson
Merlin Moncure wrote: On Jan 15, 2008 1:15 AM, Ken Johanson <[EMAIL PROTECTED]> wrote: The output of this is very verbose and broken into multiple queries making joins difficult for me to understand, I'm afraid; my current experience level likely will not reliably produce a s

Re: [GENERAL] Query to get column-names in table via PG tables?

2008-01-15 Thread Ken Johanson
Merlin Moncure wrote: On Jan 15, 2008 1:15 AM, Ken Johanson <[EMAIL PROTECTED]> wrote: The output of this is very verbose and broken into multiple queries making joins difficult for me to understand, I'm afraid; my current experience level likely will not reliably produce a s

[GENERAL] Questions about daterange() function

2014-06-25 Thread Ken Tanzer
#x27;m not finding it? Thanks in advance! Ken -- AGENCY Software A Free Software data system By and for non-profits *http://agency-software.org/ <http://agency-software.org/>* *https://agency-software.org/demo/client <https://agency-software.org/demo/client>* ken.tan...@agency-sof

Re: [GENERAL] Questions about daterange() function

2014-06-25 Thread Ken Tanzer
On Wed, Jun 25, 2014 at 6:12 PM, Adrian Klaver wrote: > On 06/25/2014 05:53 PM, Ken Tanzer wrote: > >> Hi. I've got lots of tables with start and end dates in them, and I'm >> trying to learn how to work with them as date ranges (which seem >> fantastic!)

Re: [GENERAL] Questions about daterange() function

2014-06-26 Thread Ken Tanzer
> > > So here are my questions: > > > > 1) Is there anyway to control this behavior of daterange(), or is it > just > > best to (for example) add 1 to the upper bound argument if I want an > > inclusive upper bound? > > See link for question #3; namely use the three-arg version of daterange > (typ

Re: [GENERAL] php password authentication failed for user ...

2014-07-10 Thread Ken Tanzer
On Wed, Jul 9, 2014 at 5:37 AM, basti wrote: > #hostall all 0.0.0.0 0.0.0.0 md5 > did not work. > > If it really starts with a # like you show it above, it's just a comment and pretty much guaranteed not to do anything. Cheers, Ken --

[GENERAL] Localhost vs. Unix Domain Sockets?

2014-08-18 Thread Ken Tanzer
econd is whether there is anything to do to increase the security of sockets? (e.g., analagous to encrypting localhost conenctions with SSL?) From the little I saw, it sounds like sockets are "just inherently secure," but wanted to confirm that or get another opinion! Thanks in advanc

Re: [GENERAL] Localhost vs. Unix Domain Sockets?

2014-08-18 Thread Ken Tanzer
mes match could potentially increase vulnerability (even if not known or identified yet), or am I pointlessly "fighting the last war" by keeping the names different? Cheers, Ken -- AGENCY Software A Free Software data system By and for non-profits *http://agency-software.org/ <http://a

Re: [GENERAL] Localhost vs. Unix Domain Sockets?

2014-08-18 Thread Ken Tanzer
"silly practice?" :) Cheers, Ken -- AGENCY Software A Free Software data system By and for non-profits *http://agency-software.org/ <http://agency-software.org/>* *https://agency-software.org/demo/client <https://agency-software.org/demo/client>* ken.tan...@agency-software

Re: [GENERAL] Use of 'now' constant datatype in view to take advantage of partitioned table

2014-08-21 Thread Ken Tanzer
207073 (1 row) You'll see that the last column is frozen while the other two stay current. Cheers, Ken -- AGENCY Software A Free Software data system By and for non-profits *http://agency-software.org/ <http://agency-software.org/>* *https://agency-software.org/demo/client <https

[GENERAL] Is "IF EXISTS" legit in "ALTER TABLE ... RENAME"?

2015-02-16 Thread Ken Winter
directly evokes the same error. ?!? ~ Thanks in advance ~ Ken

[GENERAL] Array string casts with SELECT but not SELECT DISTINCT

2015-02-19 Thread Ken Tanzer
SERT INTO foo (my_array) SELECT DISTINCT '{TEST}'; ^ HINT: You will need to rewrite or cast the expression. It's easy enough to add a cast, but I was curious if this was expected and desired behavior. Thanks. Ken -- AGENCY Software A F

Re: [GENERAL] Array string casts with SELECT but not SELECT DISTINCT

2015-02-20 Thread Ken Tanzer
specified, all duplicate rows are removed from the result set..." http://www.postgresql.org/docs/9.0/static/sql-select.html#SQL-DISTINCT Cheers, Ken On Fri, Feb 20, 2015 at 6:30 PM, sridhar bamandlapally < sridhar@gmail.com> wrote: > >>>ERROR: column "my_array"

Re: [GENERAL] Array string casts with SELECT but not SELECT DISTINCT

2015-02-21 Thread Ken Tanzer
I tried that and it does indeed work. (With, of course, the appropriate permissions to create the cast.) So this makes me wonder--is there any downside or unwelcome side effects to having such a cast? And if not, why isn't it part of the default setup? Cheers, Ken On Sat, Feb 21, 2015 at

Re: [GENERAL] What is the alternate of FILTER below Postgresql 9.4 ?

2015-02-24 Thread Ken Tanzer
xanne > > Also, if performance is not a big concenr, you can define a little function, which I find makes the queries easier to read: CREATE OR REPLACE FUNCTION or_null( boolean ) RETURNS boolean AS $$ SELECT CASE WHEN $1 THEN TRUE ELSE NULL END; $$ LANGUAGE sql IMMUTABLE; sele

[GENERAL] Getting Mysql data into Postgres: least painful methods?

2013-01-11 Thread Ken Tanzer
> dumpfile.sql followed by sed -i "s/\\\'/\'\'/g" dumpfile.sql but that didn't bring me much success. I figure this has to be a fairly common need, and hopefully by 2013 there's an easy solution. Thanks in advance! Ken -- AGENCY Software A data system that pu

Re: [GENERAL] Getting Mysql data into Postgres: least painful methods?

2013-01-15 Thread Ken Tanzer
I could have the script transform each file separately and pipe it to postgres: (echo 'copy mytable from stdin...' ; cat my_import_file | my_transform_script ) | psql but I'm thinking that there's no way to group those all into a transaction. Hopefully this makes sense, a

Re: [GENERAL] Getting Mysql data into Postgres: least painful methods?

2013-01-15 Thread Ken Tanzer
t bypasses mysql itself, and transforms its input files on the fly? I want to write a script that will... #!/bin/sh ... my script stuff... ... create tables... psql \copy from (transformed mysql file 1) psql \copy from (transformed mysql file 2) psql \copy from (transformed mysql file 3) ... more

Re: [GENERAL] Similarity Search with Wildcards

2013-02-28 Thread Ken Tanzer
I'm not sure about the indexing and performance impacts, but I think you could use SUBSTRING with a regex to pull out the client name, and then match on that. SELECT substring('Client Name - Description' FROM '^(.*) [-]'); substring - Client Name On Thu, Feb 28, 2013 at 12:02 AM

[GENERAL] How to get array of unique array values across rows?

2013-03-05 Thread Ken Tanzer
GROUP BY client_id; But was rebuffed with "ERROR: could not find array type for data type character varying[]" There's probably an easy answer for this, but it's completely escaping me. Any help appreciated. Thanks. Ken -- AGENCY Software A data system that puts you in c

Re: [GENERAL] How to get array of unique array values across rows?

2013-03-05 Thread Ken Tanzer
gt; > > On Tue, Mar 5, 2013 at 3:28 PM, Ken Tanzer wrote: > >> I have a field containing a set of codes in a varchar array, each tied to >> a person. >> >> client_id | integer >> | >> service_codes | chara

[GENERAL] Understanding behavior of SELECT with multiple unnested columns

2013-03-26 Thread Ken Tanzer
an explain it a bit. Also, on a practical level, would anyone know how to query so that SELECT unnest2(array['a','b','c']),unnest2(array['1','2']) would return three rows instead of six, like so: a 1 b 2 c (NULL) As that would be perfect for my

Re: [GENERAL] Understanding behavior of SELECT with multiple unnested columns

2013-03-27 Thread Ken Tanzer
d as unnest2 to try to understand what was going on. It should yield the same behavior as unnest itself. Cheers, Ken On Tue, Mar 26, 2013 at 11:55 PM, Ian Lawrence Barwick wrote: > 2013/3/27 Ken Tanzer > > > > I've been working on some queries involving multiple unnested c

[GENERAL] Postgres, apps, special characters and UTF-8 encoding

2017-03-07 Thread Ken Tanzer
slated before it can be placed into the database. I'm not clear how this is supposed to happen though. Automatically by the browser? Done in the app? Some other way? And if in the app, how is one supposed to know what the incoming encoding is? Thanks in advance for any help or pointers

Re: [GENERAL] referential integrity between elements of an array and another table?

2017-04-19 Thread Ken Tanzer
ificed the referential integrity in favor of the convenience. Just my two cents. Cheers, Ken -- AGENCY Software A Free Software data system By and for non-profits *http://agency-software.org/ <http://agency-software.org/>* *https://agency-software.org/demo/client <https://agency-softw

[GENERAL] Help: Installing 9.6 breaks local connections to 9.2 on Centos 6.9

2017-05-15 Thread Ken Tanzer
;m also confused conceptually about what is happening here. What is it that the installation (but not execution) of 9.6 does that's blocking the local 9.2 access? I'm guessing it's gotta be something in the RPM install scripts. Thanks! Ken bash-4.1$ whoami postgres bash-4

Re: [GENERAL] Help: Installing 9.6 breaks local connections to 9.2 on Centos 6.9

2017-05-15 Thread Ken Tanzer
ing the 9.6 packages really should be safe for 9.2, since they're clearly meant to exist side-by-side." And then have a setup that no longer worked as it once did. With an RHEL clone and PGDG packages straight from the horses mouth, I'd have higher expectations than that. Only because of

Re: [GENERAL] Help: Installing 9.6 breaks local connections to 9.2 on Centos 6.9

2017-05-15 Thread Ken Tanzer
On Mon, May 15, 2017 at 4:45 PM, Adrian Klaver wrote: > On 05/15/2017 01:40 PM, Ken Tanzer wrote: > > > >> But let me ask, is there a big warning about this somewhere I missed? >> Can the 9.2 updates do something to fix this, or at least create a warning >> or an R

[GENERAL] Installing module for 9.6, not 9.2, on Centos?

2017-05-22 Thread Ken Tanzer
directory though. What's the cleanest or most proper way to target 9.6 in this situation? Transcript below, and TIA. Ken [root@hosting table_log-0.4.4]# more Makefile MODULES = table_log DATA_built = table_log.sql DOCS = README.table_log ifdef USE_PGXS PGXS := $(shell /usr/pgsql-9.

Re: [GENERAL] Installing module for 9.6, not 9.2, on Centos?

2017-05-23 Thread Ken Tanzer
contrib' /usr/bin/install -c -m 644 table_log.sql '/usr/pgsql-9.2/share/contrib/' /usr/bin/install -c -m 755 table_log.so '/usr/pgsql-9.2/lib/' /usr/bin/install -c -m 644 .//README.table_log '/usr/pgsql-9.2/doc/contrib/' Any further help appreciated! Thanks.

Re: [GENERAL] Installing module for 9.6, not 9.2, on Centos?

2017-05-23 Thread Ken Tanzer
ble set that could be interfering? > > I didn't see anything that would apply. I've attached a dump of environment variables and also a re-run of the compile/install process. Cheers, Ken > > -- AGENCY Software A Free Software data system By and for non-profits *http://agency-

Re: [GENERAL] Installing module for 9.6, not 9.2, on Centos?

2017-05-23 Thread Ken Tanzer
On Tue, May 23, 2017 at 5:34 PM, Adrian Klaver wrote: > On 05/23/2017 05:27 PM, Ken Tanzer wrote: > >> >> But the install still goes to 9.2: >> >> PATH=/usr/local/pgsql96/bin/:$PATH make USE_PGXS=1 install >> >> >> Did you do: &

Re: [GENERAL] Installing module for 9.6, not 9.2, on Centos?

2017-05-23 Thread Ken Tanzer
concept, and know what kind of pitfalls if any to expect or beware of. Thanks! Ken -- AGENCY Software A Free Software data system By and for non-profits *http://agency-software.org/ <http://agency-software.org/>* *https://agency-software.org/demo/client <https://agency-software.org/demo/clie

[GENERAL] Help with restoring a dump in Tar format? (dependencies/ordering)

2017-06-05 Thread Ken Tanzer
covered it during development/testing and not after a DB crash, which is why I'm also happily not gouging my eyeballs out right now. :) Cheers, and thanks in advance! Ken -- AGENCY Software A Free Software data system By and for non-profits *http://agency-software.org/ <http://agency-sof

Re: [GENERAL] Help with restoring a dump in Tar format? (dependencies/ordering)

2017-06-05 Thread Ken Tanzer
or be followed by something like this: n.b., In CHECK expressions, Postgres will not prevent you from calling functions that reference other rows or tables. However, doing so may have undesirable consequences, including the possible inability to restore from output created by pg_dump. (Are there other p

Re: [GENERAL] Help with restoring a dump in Tar format? (dependencies/ordering)

2017-06-05 Thread Ken Tanzer
enient to see the logic spelled out when using \d on the table. Cheers, Ken -- AGENCY Software A Free Software data system By and for non-profits *http://agency-software.org/ <http://agency-software.org/>* *https://agency-software.org/demo/client <https://agency-software.org/demo/clien

Re: [GENERAL] Help with restoring a dump in Tar format? (dependencies/ordering)

2017-06-05 Thread Ken Tanzer
Basically, if you have no way to test your backup/restore procedure before > hand you are flying blind. > > In this case, we had tested the restore part. But then we changed the DB in a way that made it stop working. Good reminder to retest that periodically! Ken -- AGENCY So

Re: [GENERAL] Help with restoring a dump in Tar format? (dependencies/ordering)

2017-06-05 Thread Ken Tanzer
ers not so much, so you wouldn't really want to automatically display it inline. Ken -- AGENCY Software A Free Software data system By and for non-profits *http://agency-software.org/ <http://agency-software.org/>* *https://agency-software.org/demo/client <https://agency-software.org/demo

Re: [GENERAL] Help with restoring a dump in Tar format? (dependencies/ordering)

2017-06-05 Thread Ken Tanzer
w for selection and reordering* of all archived items, support parallel restoration, and are compressed by default. The "directory" format is the only format that supports parallel dumps. Cheers, Ken -- AGENCY Software A Free Software data system By and for non-profits *http://agency

  1   2   3   4   >