Re: [GENERAL] || operator

2014-09-04 Thread Brett Mc Bride
On Wed, 2014-09-03 at 21:27 -0700, Vinayak wrote: Hello Pavel, Thank you for reply. postgres=# select 'abc '::char(7) || 'dbe '::char(6); ?column? *abcabc* (1 row) but it gives the result abcabc. It should be abcdbe. I believe there was a typo in

Re: [GENERAL] Josh's Comments on Hstore / Jsonb

2014-02-28 Thread Brett Mc Bride
On 26/02/14 09:32, Merlin Moncure wrote: On Tue, Feb 25, 2014 at 3:43 PM, john.tiger john.tigernas...@gmail.commailto:john.tigernas...@gmail.com wrote: Somehow my comments didn't go thru on the soup blog but wanted to throw in more support for this patch Josh, you are so right on the money.

Re: [GENERAL] Access to inserted rows via select in a statement

2011-10-19 Thread Brett Mc Bride
How about storing the transaction ID of the inserting/updating transaction in a column of your table? You could query that against the current transaction ID in your trigger function. See txid_current() in the docs (http://www.postgresql.org/docs/9.1/interactive/functions-info.html) From:

Re: [GENERAL] No PL/PHP ? Any reason?

2010-06-22 Thread Brett Mc Bride
There's this one: https://www.commandprompt.com/community/plphp/ -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Carlo Stonebanks Sent: Tuesday, 22 June 2010 1:29 PM To: pgsql-general@postgresql.org Subject: [GENERAL]

Re: [GENERAL] How to force select to return exactly one row

2010-06-21 Thread Brett Mc Bride
How about: SELECT * from ( SELECT somecolumns FROM ko LEFT JOIN t1 ON t1.primarykey= ko.t1foreignkwey ... LEFT JOIN tn ON tn.primarykey= ko.tnforeignkwey WHERE ko.primarykey='someprimarykeyvalue' UNION ALL SELECT default_value ) LIMIT 1; -Original Message- From:

Re: [GENERAL] How to force select to return exactly one row

2010-06-21 Thread Brett Mc Bride
] How to force select to return exactly one row Brett Mc Bride brett.mcbr...@deakin.edu.au wrote: How about: SELECT * from ( SELECT somecolumns FROM ko LEFT JOIN t1 ON t1.primarykey= ko.t1foreignkwey ... LEFT JOIN tn ON tn.primarykey= ko.tnforeignkwey WHERE ko.primarykey