Re: [GENERAL] Function

2017-10-27 Thread Raymond O'Donnell
)::int AS cod_mun FROM geo_politico.g_br_municipios WHERE substring(cd_geocmu,1,2)::int = num by itself (with a suitable value of "num"), do you get more than one row? Also, what is the definition of the function parametros.calcula_parametros()? Ray. -- Raymond O'Donnell :: Galway ::

Re: [GENERAL] Type cast in PHP PDO (does not work like in Java?)

2017-08-05 Thread Raymond O'Donnell
lon in named parameters, so maybe that's causing problems. You could try casting like this: select words_buy_vip(cast(? as text), cast(? as int), .); Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To

Re: [GENERAL] WAL being written during SELECT * query

2017-04-04 Thread Raymond O'Donnell
ing read only transactions. As far as I know (and I could be wrong), WAL segments reflect activity in the entire cluster, not just one table - so perhaps there is write activity happening in other tables, or in other databases. Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- S

Re: [GENERAL] Fwd: parameter type is unknown error

2017-03-06 Thread Raymond O'Donnell
lue. Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- 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] (solved) R: Very strange problem on index

2017-02-02 Thread Raymond O'Donnell
this, but did you run ANALYZE on the table after creating it? - Depending on how you created the table, the statistics needed by the planner may or may not have been up to date. Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] Why is table not found?

2017-01-31 Thread Raymond O'Donnell
dx"; CREATE INDEX "Raum_RaumID_idx" ON "Raum" USING btree ("RaumID"); But psql tells me "Raum" is not existent: egon@xfEinzel ~ $ psql Hausrat psql (9.3.15) Type "help" for help. Hausrat=# SELECT * FROM Raum; ERROR: relation "raum&qu

Re: [GENERAL] Fwd: I could not see any row in audit table

2017-01-25 Thread Raymond O'Donnell
r something else? Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- 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] [OT] Postgresql and PHP

2016-12-23 Thread Raymond O'Donnell
query) { print error...} Are you sure it's failing? Try this: if ($query === false) { } PHP has funny ideas about what's true and false. Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to you

Re: [GENERAL] Multidimentional array access

2016-12-09 Thread Raymond O'Donnell
On 09/12/16 15:30, Tom Lane wrote: As of 9.6 you could use the shorthand array_value = Eg[i][:] regards, tom lane I hadn't spotted that - very handy - will go and read up on it. :-) Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via

Re: [GENERAL] How to loop through multi-dimentional array in PL/PGSQL

2016-12-09 Thread Raymond O'Donnell
On 09/12/16 10:42, Raymond O'Donnell wrote: On 09/12/16 06:35, VENKTESH GUTTEDAR wrote: Hello, Please help me in accessing multi-dimentional array in postgresql PL/PGSQL. for i in array_lower(product_list, 1) .. array_upper(product_list, 1) LOOP product_list[i][0]; END

Re: [GENERAL] How to loop through multi-dimentional array in PL/PGSQL

2016-12-09 Thread Raymond O'Donnell
? Or is there any other way to access, i am getting null for product_list[i][0]; By default, PostgreSQL uses 1-based arrays (i.e. no [0] slot), so maybe that's your problem. Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list (pgsql-general

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

2016-12-03 Thread Raymond O'Donnell
://wiki.postgresql.org/wiki/Apt Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- 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] About the MONEY type

2016-11-30 Thread Raymond O'Donnell
to remember that it was actually deprecated at some point - this is going back quite a few years. This was later reversed, though I don't know why. Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

Re: [GENERAL] Import data from MS SQL Server 2014 to Postgresql 9.6 using dbi-link and fdw (error: utf-8/uft-16)

2016-11-10 Thread Raymond O'Donnell
On 10/11/16 10:34, Juliano wrote: Hi, I'm trying to import some data from a MS SQL Server 2014 sequential database to Postgresql using dbi-link. Have you tried the foreign data wrapper for MS SQL Server? It's here:

Re: [GENERAL] PHP-Shop with PostgreSQL

2016-11-08 Thread Raymond O'Donnell
On 08/11/16 18:24, Joshua D. Drake wrote: Hello, Drupal + Ubercart should service your needs. +1 to what the others said about Drupal + Ubercart: easy to set up, but very customisable too if you need to. There are a number of freely-available themes which are aimed at online shops and work

Re: [GENERAL] Generic way to test input arguments

2016-10-17 Thread Raymond O'Donnell
On 17/10/16 16:40, said assemlal wrote: Hello, I am looking for a way to test generically input arguments to raise an exception if one is either null or empty. I was thinking to create a function who takes an array to check them but not sure if it's really good. It's not clear what you want

Re: [GENERAL] isnull() function in pgAdmin3

2016-10-03 Thread Raymond O'Donnell
On 03/10/16 14:39, dudedoe01 wrote: What is the most feasible way to emulate the below MySQL function into postgreSQL. Since the isnull() function is no longer supported in 9.6 version. I have tried every trick in the hat to get the desired results. Still 'RPG INV' doesn't show only the other

Re: [GENERAL] please remove outdated site from 2005

2016-09-04 Thread Raymond O'Donnell
On 04/09/16 19:33, Lukas Lehner wrote: Hi when I use a search engine for the term "Postgres Certification" this page shows up https://www.postgresql.org/about/news/333/ please remove that, very much outdated. The referenced link doesn't exist anymore (404 No such domain) In all fairness,

Re: [GENERAL] MediaWiki + PostgreSQL is not ready for production?

2016-07-20 Thread Raymond O'Donnell
On 20/07/16 16:57, John DeSoi wrote: On Jul 18, 2016, at 11:47 PM, John R Pierce wrote: Drupal even tried to offer a database API so plugin developers wouldn't touch SQL directly, but too many ignored it. I have been using Drupal with PostgreSQL for more than 10 years

Re: [GENERAL] archive_command during database shutdown

2016-05-25 Thread Raymond O'Donnell
On 25/05/16 20:57, Jeff Janes wrote: On Wed, May 25, 2016 at 10:31 AM, Sameer Kumar wrote: On Thu, 26 May 2016, 1:25 a.m. Jeff Janes, wrote: I've recently wanted to run a different archive_command during database shutdown than during normal

Re: [GENERAL] Thoughts on "Love Your Database"

2016-05-17 Thread Raymond O'Donnell
min 3 are due to upstream bugs in wxWidgets, over which the pgAdmin team has no control (hence pgAdmin 4). Having said all that, I've rarely had any trouble with pgAdmin 3 on Windows 7 and XP, Ubuntu and Debian; just a very occasional crash (maybe one every six months). Ray. -- Raymond O'

Re: [GENERAL] Release Notes Link is broken on the website

2016-05-12 Thread Raymond O'Donnell
postgresql.org/docs/9./static/release-9-6.html ^^^ Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- 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] Allow disabling folding of unquoted identifiers to lowercase

2016-05-08 Thread Raymond O'Donnell
readable when you use long table / fiel names. I reckon this is just a matter of style... I use underscores to make long names readable... create table my_table_with_a_really_long_name; and it works fine. Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-

Re: [GENERAL] Bypassing NULL elements in row_to_json function

2016-04-08 Thread Raymond O'Donnell
the row_to_json function and > include only the fields that are non-null? You could use a CTE to filter out the nulls (not tested - I haven't used JSON in PG (yet!)): with no_nulls as ( select ... from my_table where whatever is not null ) select row_to_json() from no_nulls; Ray. --

Re: [GENERAL] Please let me know the latest PostgreSQL version available on Solaris 11?

2016-04-08 Thread Raymond O'Donnell
://www.postgresql.org/download/solaris/ -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- 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 from two tables & concat the result

2016-02-03 Thread Raymond O'Donnell
"d.id" (partly my mistake, I missed that the column is called "id" and not "domain_id" in the domains table). Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- 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 from two tables & concat the result

2016-02-03 Thread Raymond O'Donnell
tables, having additional serial and domain_id columns seems like overkill. Why not ditch them and use the domain name and username as the primary keys? Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- 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 from two tables & concat the result

2016-02-03 Thread Raymond O'Donnell
On 03/02/2016 13:57, arnaud gaboury wrote: > On Wed, Feb 3, 2016 at 2:19 PM, Raymond O'Donnell <r...@iol.ie> wrote: >> On 03/02/2016 13:11, arnaud gaboury wrote: >> >>> Hum hum... >>> -- >>> SE

Re: [GENERAL] query from two tables & concat the result

2016-02-03 Thread Raymond O'Donnell
t not null, domain_name text not null, created timestamp with time zone not null default now(), constraint users_pk primary key (username, domain_name), constraint users_domains_fk foreign key (domain_name) references domains(domain_name) ); And then your query would look something like this: selec

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

2016-01-25 Thread Raymond O'Donnell
On 25/01/2016 10:16, Brian Cardarella wrote: > Is it possible, and if so how, to dump and then load a database to/from > a file from within a psql connection? You can use the COPY command to do a table at a time, but you'll get just the data - you won't get permissions etc. Ray. -- R

Re: [GENERAL] Text parameter is treated as sql query in postgresql function

2016-01-12 Thread Raymond O'Donnell
and $3 and I missed whatever passed upthread, but at a guess I'd say all the quoting is causing problems here. Why not use the quote_ident() and quote_literal() functions? By the same token, I don't think you need to put quotation marks around the parameters. Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- 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] Querying same lookup table with multiple columns based on another view

2015-11-17 Thread Raymond O'Donnell
ist - thanks!] You'd better show us your table structures - we're only guessing otherwise. However, I think typing efficiency isn't important, but rather what your application needs to do with the data - you only type the query once. :-) -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Se

Re: [GENERAL] Querying same lookup table with multiple columns based on another view

2015-11-17 Thread Raymond O'Donnell
; ON UPDATE CASCADE ON DELETE RESTRICT. > > In 9.3 is there an alter constraint option or do I have to drop the > constraint and add the new one? I just had a quick look at the docs for 9.3: http://www.postgresql.org/docs/9.3/static/sql-altertable.html I don't see ALTER CONST

Re: [GENERAL] Querying same lookup table with multiple columns based on another view

2015-11-17 Thread Raymond O'Donnell
ype out your column names - I'm only guessing without seeing the DDL, but it sounds as if a column called macro_lookup_id exists in more than one table. You'll need to do something like this: select sample.macro_lookup_id as col_name_1, macroscopic.macro_lookup_id as col_name_2, [] This is

Re: [GENERAL] Selectively Importing Data

2015-10-31 Thread Raymond O'Donnell
org/docs/9.4/static/datatype-numeric.html#DATATYPE-SERIAL [2] http://www.pgadmin.org/support/list.php -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- 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] Hierarchical Query Question (PHP)

2015-10-30 Thread Raymond O'Donnell
rial, taxonid integer, -- use the lookup table parentid integer, -- use the lookup table constraint mammals_taxon_fk foreign key (taxonid) references taxon(taxonid) ); If parentid also references taxon.taxonid, add a similar constraint for it too, Ray. -- Raymond O'Donnell :: Galwa

Re: [GENERAL] Hierarchical Query Question (PHP)

2015-10-30 Thread Raymond O'Donnell
isible, you can make it visible under the "View" menu. As a bonus, you can select a block of SQL and only the selected code will get executed. Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

Re: [GENERAL] Selecting pairs of numbers

2015-10-05 Thread Raymond O'Donnell
metrical solution to an algebraic problem. Thanks! Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Selecting pairs of numbers

2015-10-05 Thread Raymond O'Donnell
probably something simple that I'm just not seeing If anyone's interested, these numbers represent channels and pistons on the combination system of a largish pipe organ... it's for a hobby project. Many thanks in advance! Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie

Re: [GENERAL] Selecting pairs of numbers

2015-10-05 Thread Raymond O'Donnell
On 05/10/2015 19:53, Adrian Klaver wrote: > On 10/05/2015 11:39 AM, Raymond O'Donnell wrote: >> Hello all, >> >> I have an SQL problem which ought to be simple, but I can't get my head >> around it. >> >> I have pairs of integers - let's call them (x, y).

Re: [GENERAL] Selecting pairs of numbers

2015-10-05 Thread Raymond O'Donnell
On 05/10/2015 20:08, Adrian Klaver wrote: > On 10/05/2015 12:00 PM, Raymond O'Donnell wrote: >> On 05/10/2015 19:53, Adrian Klaver wrote: >>> On 10/05/2015 11:39 AM, Raymond O'Donnell wrote: >>>> Hello all, >>>> >>>> I have an SQL pro

Re: [GENERAL] table dependencies

2015-09-07 Thread Raymond O'Donnell
On 06/09/2015 22:59, FarjadFarid(ChkNet) wrote: > No worries. > > I found a way. > Would you share it, for the archives? Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] PostgreSQL Developer Best Practices

2015-08-26 Thread Raymond O'Donnell
of fish and a murder of crows... wonderfully evocative collective nouns. Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- 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] pghba.conf

2015-08-03 Thread Raymond O'Donnell
. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- 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] I lost my password

2015-07-27 Thread Raymond O'Donnell
forget to edit pg_hba.conf once again and set trust back to md5' (and re-start the service). Finally, note that the postgres user is the super-user, so the usual caveats apply... better to create another ordinary user for normal connections. I hope this helps, Ray. -- Raymond O'Donnell :: Galway

Re: [GENERAL] I lost my password

2015-07-27 Thread Raymond O'Donnell
and examples out there - Google is your friend. Qt's own documentation is very good. For plain C, read PostgreSQL's own docs: http://www.postgresql.org/docs/9.4/static/libpq.html Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] timestamp check

2015-07-13 Thread Raymond O'Donnell
timezone information is that subtracting two timestamps results in an interval value. See table 9-27 on this page: http://www.postgresql.org/docs/9.4/static/functions-datetime.html Also, please don't top-post; the convention on this list is to bottom-post. Thanks! :-) Ray. -- Raymond O'Donnell

Re: [GENERAL] A table of magic constants

2015-07-11 Thread Raymond O'Donnell
is it in the wiki? session_user, current_timestamp and current_user are all functions, not magic constants: http://www.postgresql.org/docs/9.4/static/functions-datetime.html http://www.postgresql.org/docs/9.4/static/functions-info.html I hope this helps, Ray. -- Raymond O'Donnell :: Galway :: Ireland r

Re: [GENERAL] timestamp check

2015-07-11 Thread Raymond O'Donnell
not displaying timezone..any help..? Because TIMESTAMPTZ - TIMESTAMPTZ = INTERVAL, not TIMESTAMPTZ. Also, why on earth are you doing all those string concatenations in the to_char() calls? Why not just do to_char(..., '-MM-DD H24:MI:SS')? Ray. -- Raymond O'Donnell :: Galway :: Ireland r

Re: [GENERAL] PL/pgSQL: How to return two columns and multiple rows

2015-06-18 Thread Raymond O'Donnell
FOR i IN 1..4 LOOP RETURN NEXT (foo || i::text, bar || i::text); END LOOP; RETURN; END; $$ language 'plpgsql'; mydb= select myfunc('foo','bar'); You need to do: select * from myfunc('foo','bar'); Ray. -- Raymond O'Donnell :: Galway

Re: [GENERAL] My postgres is not logging anymore

2015-06-18 Thread Raymond O'Donnell
On 18/06/2015 13:13, Maila Fatticcioni wrote: On 06/18/2015 11:48 AM, Raymond O'Donnell wrote: On 18/06/2015 10:34, Maila Fatticcioni wrote: Hello. I have a postgres cluster made by two nodes with OS Ubuntu 14.04. About two weeks ago I did a minor update of postgres to the version 9.4.1-1

Re: [GENERAL] My postgres is not logging anymore

2015-06-18 Thread Raymond O'Donnell
and logging_collector, at least, need to be set as above to generate log files. Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- 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] Between with a list of ranges possible ?

2015-05-29 Thread Raymond O'Donnell
between start_value3 and end_value3; If they're all the same table, just use OR: ... where (number * 3 between start_value1 and end_value1) or (number * 3 between) etc. Or am I missing something? Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing

Re: [GENERAL] Restarting DB after moving to another drive

2015-05-11 Thread Raymond O'Donnell
information from PostgreSQL's own logs, which by default on Windows are in a directory called pg_log under the data directory. Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Restarting DB after moving to another drive

2015-05-11 Thread Raymond O'Donnell
no idea I'd guess that changing the drive letter might well cause Bad Things to happen. Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql

Re: [GENERAL] Moving Specific Data Across Schemas Including FKs

2015-04-23 Thread Raymond O'Donnell
schema without the FK constraints, copy the data, then add the constraints afterwards. Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref

Re: [GENERAL] Moving Specific Data Across Schemas Including FKs

2015-04-23 Thread Raymond O'Donnell
On 23/04/2015 19:08, Raymond O'Donnell wrote: On 23/04/2015 18:09, Cory Tucker wrote: I have the need to move a specific set of data from one schema to another. These schemas are on the same database instance and have all of the same relations defined. The SQL to copy data from one table

Re: [GENERAL] Best way to migrate a 200 GB database from PG 2.7 to 3.6

2015-04-15 Thread Raymond O'Donnell
. Is there another possibility to migrate a database with 200 GB ? Those version numbers aren't correct... current PG major versions run from 9.0 to 9.4. I don't think there was ever any version less than 6 (though I could be wrong). Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie

Re: [GENERAL] check data for datatype

2015-03-27 Thread Raymond O'Donnell
where the column ~ regexp http://www.postgresql.org/docs/9.4/static/functions-matching.html#FUNCTIONS-POSIX-REGEXP HTH, Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] :Posgres - performance problem

2015-03-25 Thread Raymond O'Donnell
. It is terrible. You could create a view specifically for export, which would gather together data from all the tables. Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Load Data with COPY

2015-03-24 Thread Raymond O'Donnell
/convert the data in Numbers into a format recognizable by postgres? Mac OS 10.10.6; postgres 9.3.5.2 Well, the error says that you're trying to load a string, project_name, into an integer column. Is there a header row in the CSV file? - if so, delete it and try again. Ray. -- Raymond

Re: [GENERAL] Installation Size showing huge size in postgres installed on windows os

2015-03-19 Thread Raymond O'Donnell
or the small postgres databases I would have created use 121GB. Any reason why it shows 121GB Could you share with us \l+ command in psql session ? Also, see what Windows reports as the space taken up by the installation and data directories. Ray. -- Raymond O'Donnell :: Galway :: Ireland

Re: [GENERAL] parallel dump fails to dump large tables

2015-02-14 Thread Raymond O'Donnell
PST [8636]: [3-1] user=pdroot,db=iii,appname=pg_dump FATAL: connection to client lost There's your problem - something went wrong with the network. Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] Collection

2015-02-13 Thread Raymond O'Donnell
| {abc} 2 | {def,ghi} (2 rows) Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- 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] Command to reset entire PgSQL cluster?

2015-02-10 Thread Raymond O'Donnell
sure that permissions were correct. Mind you, I've never found initdb particularly slow... Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org

Re: [GENERAL] pgdump

2015-01-30 Thread Raymond O'Donnell
). Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- 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 duplicate data for few times by SQL command in PG

2015-01-23 Thread Raymond O'Donnell
this? - insert into new table select whatever from original table cross join generate_series(1, 3) order by whatever This assumes that you want each item duplicated the same number of times. Hope this helps, Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent

Re: [GENERAL] Fwd: Ask for a question

2015-01-21 Thread Raymond O'Donnell
clear. Can you show your table structure, ideally with some sample data, and what you hope to get from the query? Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Fwd: Ask for a question

2015-01-21 Thread Raymond O'Donnell
On 21/01/2015 18:02, Pierre Hsieh wrote: Hi Raymond, Thanks for your reply. Please see detail as following. Thanks again. Can you describe *in words* what sort of calculation you want to do? Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing

Re: [GENERAL] Fwd: Ask for a question

2015-01-21 Thread Raymond O'Donnell
then that's no problem: http://www.postgresql.org/docs/9.4/static/functions-aggregate.html#FUNCTIONS-AGGREGATE-STATISTICS-TABLE Hope this helps, Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

Re: [GENERAL] Fwd: Ask for a question

2015-01-21 Thread Raymond O'Donnell
On 21/01/2015 16:06, Brian Dunavant wrote: This is not quite true. I don't believe there are any flight simulator easter-eggs hidden inside the Postgres code. :) No? Awww. :-) Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list (pgsql

Re: [GENERAL] localtime(0)

2014-12-29 Thread Raymond O'Donnell
. Depending on your needs, you could use to_char() to format the value of clock_timestamp() as you wish. This outputs a string rather than a time value, but would be fine for logging, say. Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list (pgsql

Re: [GENERAL] phppgadmin

2014-11-06 Thread Raymond O'Donnell
On 06/11/2014 15:24, Ramesh T wrote: hello, any guidelines is their how to use these tool..? not home site.. http://phppgadmin.kattare.com/phppgadmin/...:) Here's the home site: http://phppgadmin.sourceforge.net Lots of documentation available there. Ray. -- Raymond

Re: [GENERAL] PostgreSQL server won't start, corrupt?

2014-10-09 Thread Raymond O'Donnell
you did there and seeing if that fixes it. I'd also use something other than Notepad it has a hard time with non-Windows line endings. Notepad++ is a very good free text editor, for example. Hope this helps, Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql

Re: [GENERAL] PostgreSQL server won't start, corrupt?

2014-10-09 Thread Raymond O'Donnell
On 09/10/2014 21:44, John R Pierce wrote: On 10/9/2014 1:41 PM, Raymond O'Donnell wrote: The messages in the log file are: 2014-10-09 12:59:40 PDT LOG: invalid connection type  2014-10-09 12:59:40 PDT CONTEXT: line 1 of configuration file C:/postgres/pg_hba.conf 2014-10-09 12:59:40 PDT

Re: [GENERAL] PANIC: could not create file pg_xlog/xlogtemp.7884: No space left on device

2014-09-26 Thread Raymond O'Donnell
-on-postgres.html HTH, Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- 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] PANIC: could not create file pg_xlog/xlogtemp.7884: No space left on device

2014-09-26 Thread Raymond O'Donnell
-on-postgres.html HTH, Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- 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] stackbuilder

2014-09-10 Thread Raymond O'Donnell
. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- 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] Does writing new records while massive update will generate lock ?

2014-08-21 Thread Raymond O'Donnell
postgresql *8.4* Not that this helps your issue, but you may not be aware that 8.4 is now end-of-life and so is no longer supported: http://www.postgresql.org/support/versioning Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] POWA tool

2014-08-20 Thread Raymond O'Donnell
need to install POWA..i got powa.zip please let me know how to install POWA.ZIP for my postgres using putty tool .. What is POWA? Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] PostgreSQL as a triple store

2014-08-12 Thread Raymond O'Donnell
for development. Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- 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] Function Syntax Help

2014-06-26 Thread Raymond O'Donnell
On 26/06/2014 17:26, Raymond O'Donnell wrote: On 25/06/2014 23:19, Dennis Ryan wrote: I having trouble with correct syntax to get this trigger function to compile. I have tried every combination of removing the ‘;’ characters but the function will not compile. Can someone tell me what I am

Re: [GENERAL] Function Syntax Help

2014-06-26 Thread Raymond O'Donnell
INTO sn_dm_b.pm201001 VALUES (NEW.*); The problem is the semi-colon after (NEW.*). There isn't one inside a CASE construct. Ray. END; RETURN NULL; END; $$ LANGUAGE plpgsql; ERROR: syntax error at or near ; LINE 7: END; -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie

Re: [GENERAL] Re: Cannot start Postgresql 9.3 as a service in Windows 2012 Server with a domain account

2014-06-12 Thread Raymond O'Donnell
) - log_destination = 'stderr' logging_collector = on log_directory = 'pg_log' log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' - and the log files are being created in data/pg_log as expected. HTH, Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list

Re: [GENERAL] Cannot start Postgresql 9.3 as a service in Windows 2012 Server with a domain account

2014-06-11 Thread Raymond O'Donnell
event log showed a terse error about timeout (even though it did not really take more than a couple of seconds for it to fail). By the PostgreSQL's own logs should have some more detail - the event log entry is indeed terse, PG writes all the interesting stuff to its own log. Ray. -- Raymond

Re: [GENERAL] How can I select rows by comparing an array data type column with multiple values ?

2014-06-02 Thread Raymond O'Donnell
such a set ? You can use the array overlap operator, something like this: SELECT WHERE tags ARRAY['apple', 'banana']; See here: http://www.postgresql.org/docs/9.3/static/functions-array.html Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list

Re: [GENERAL] Need help on triggers - postgres 9.1.2

2014-05-22 Thread Raymond O'Donnell
to specify where c_cde is coming from - so OLD.c_cde or NEW.c_cde (or else SELECT FROM... if it's coming from somewhere else). Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] postgres 9.2.4 - ERROR: invalid input syntax for type numeric:

2014-05-21 Thread Raymond O'Donnell
of being able to help. Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- 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] Ubuntu Packages / Config Files

2014-05-01 Thread Raymond O'Donnell
? Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- 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] Escape double-quotes in text[]?

2014-04-30 Thread Raymond O'Donnell
On 29/04/2014 22:54, David G Johnston wrote: Raymond O'Donnell wrote Hi all, Probably a silly question, but I'm having trouble figuring out the answer... if I'm constructing an string representation of a value to go into a text[] column, and one of the text literals includes double-quotes

Re: [GENERAL] Escape double-quotes in text[]?

2014-04-30 Thread Raymond O'Donnell
On 30/04/2014 17:32, David G Johnston wrote: Raymond O'Donnell wrote On 29/04/2014 22:54, David G Johnston wrote: Raymond O'Donnell wrote Hi all, Probably a silly question, but I'm having trouble figuring out the answer... if I'm constructing an string representation of a value to go

[GENERAL] Escape double-quotes in text[]?

2014-04-29 Thread Raymond O'Donnell
this into a text[] column directly? - '{abc, def}' Or would I need to do this? - E'{abc, def}' or something different again? I'm doing this from PHP via the Zend framework (v.1) if it makes any difference. Thanks, Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent

Re: [GENERAL] Escape double-quotes in text[]?

2014-04-29 Thread Raymond O'Donnell
On 29/04/2014 22:10, Raymond O'Donnell wrote: Hi all, Probably a silly question, but I'm having trouble figuring out the answer... if I'm constructing an string representation of a value to go into a text[] column, and one of the text literals includes double-quotes, do I need to escape

Re: [GENERAL] Can't delete role because of unknown object

2014-04-22 Thread Raymond O'Donnell
, and then \du will give you a list of all roles - in the output from \du, look at the column Member of. HTH, Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org

Re: [GENERAL] Can't delete role because of unknown object

2014-04-22 Thread Raymond O'Donnell
On 22/04/2014 21:26, Craig Libscomb wrote: On Tue, Apr 22, 2014 at 3:06 PM, Raymond O'Donnell r...@iol.ie mailto:r...@iol.ie wrote: On 22/04/2014 20:47, Craig Libscomb wrote: The following command: DROP USER IF EXISTS jpate; generates the following output

Re: [GENERAL] replace function, what happens afterwards?

2014-04-16 Thread Raymond O'Donnell
at the point when you execute CREATE FUNCTION anyway - the text representation of the code is stored, and then loaded when the function is invoked. I could be wrong about this - others will know better. Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list

Re: [GENERAL] [GENARAL] round() bug

2014-04-15 Thread Raymond O'Donnell
) postgres=# select version(); version - PostgreSQL 9.1.4, compiled by Visual C++ build 1500, 64-bit (1 row) Same on 9.3.0. Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql

Re: [GENERAL] [GENARAL] round() bug

2014-04-15 Thread Raymond O'Donnell
On 15/04/2014 17:34, David G Johnston wrote: Raymond O'Donnell wrote On 15/04/2014 17:20, David G Johnston wrote: Willy-Bas Loos-3 wrote Hi, I ran into some strange behavior. Seems like a bug to me? wbloos=# select round(0.5::numeric), round(0.5::double precision); round | round

Re: [GENERAL] import .sql file into PostgreSQL database

2014-04-09 Thread Raymond O'Donnell
for relation. It looks as if you haven't the OS permissions to read the SQL file. Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref

Re: [GENERAL] import .sql file into PostgreSQL database

2014-04-08 Thread Raymond O'Donnell
is the Permission denied coming from? - the OS, or Postgres? Check, in addition to the above, that the Postgres user you're using for the connection has the requisite INSERT, SELECT (etc) permissions on the database objects. Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via

  1   2   3   4   5   6   7   8   9   10   >