On 08/28/2014 06:22 AM, Jim Garrison wrote:
> Given (pseudocode)
>
> CREATE TABLE kvstore (
> k varchar primary key,
> v varchar);
>
> CREATE OR REPLACE FUNCTION store_key_value_pair(k varchar, v varchar)
> returns boolean as $$
> BEGIN
> INSERT INTO kvstore (k,
On 08/28/2014 09:39 AM, Patrick Krecker wrote:
> We have a periodic network connectivity issue (unrelated to Postgres)
> that is causing the replication to fail.
>
> We are running Postgres 9.3 using streaming replication. We also have
> WAL archives available to be replayed with restore_command.
We have a periodic network connectivity issue (unrelated to Postgres) that
is causing the replication to fail.
We are running Postgres 9.3 using streaming replication. We also have WAL
archives available to be replayed with restore_command. Typically when I
bring up a slave it copies over WAL arch
Jim Garrison writes:
> Given (pseudocode)
>
> CREATE TABLE kvstore (
> k varchar primary key,
> v varchar);
>
> CREATE OR REPLACE FUNCTION store_key_value_pair(k varchar, v varchar)
> returns boolean as $$
> BEGIN
> INSERT INTO kvstore (k, v)
> SELECT :k,
-Original Message-
From: Adrian Klaver [mailto:adrian.kla...@aklaver.com]
Sent: Wednesday, August 27, 2014 12:42 PM
To: Huang, Suya; pgsql-general@postgresql.org
Subject: Re: [GENERAL] how to query against nested hstore data type
On 08/26/2014 06:50 PM, Huang, Suya wrote:
>
>
> -Origi
Jim Garrison wrote
> Given (pseudocode)
>
> CREATE TABLE kvstore (
> k varchar primary key,
> v varchar);
>
> CREATE OR REPLACE FUNCTION store_key_value_pair(k varchar, v varchar)
> returns boolean as $$
> BEGIN
> INSERT INTO kvstore (k, v)
> SELECT :k, :v
On Wed, 27 Aug 2014, Jeff Ross wrote:
You want the E in front of the entire string, not just before the \n.
select
'Use Discover: ' || E'\t' || 'Yes' || E'\n'
Jeff,
That did the trick. Turns out that 202 of 204 rows had the newline! The
syntax that worked:
update benthos set stream = 'Sta
On 14/08/28 8:04, Ian Barwick wrote:
> On 14/08/28 7:31, Rich Shepard wrote:
>> I have some rows in a table where a column attribute has a newline (\n)
>> appended to the string. How do I represent that newline character in a SQL
>> statement using psql?
>>
>> I've tried adding E'\n' to the end
On 14/08/28 7:31, Rich Shepard wrote:
> I have some rows in a table where a column attribute has a newline (\n)
> appended to the string. How do I represent that newline character in a SQL
> statement using psql?
>
> I've tried adding E'\n' to the end of the string but that doesn't work.
>
>
I have some rows in a table where a column attribute has a newline (\n)
appended to the string. How do I represent that newline character in a SQL
statement using psql?
I've tried adding E'\n' to the end of the string but that doesn't work.
Here's what I see when I select distinct for that
Given (pseudocode)
CREATE TABLE kvstore (
k varchar primary key,
v varchar);
CREATE OR REPLACE FUNCTION store_key_value_pair(k varchar, v varchar)
returns boolean as $$
BEGIN
INSERT INTO kvstore (k, v)
SELECT :k, :v
WHERE NOT EXISTS (select 1 from kv
On 08/27/2014 02:19 PM, John R Pierce wrote:
On 8/27/2014 2:17 PM, Prabhjot Sheena wrote:
Database postgresql 8.4
i shutdown the database and restarted database and now its not
starting and i m getting this error
[caesius@dbtest05 pg_log]$ 2014-08-27 14:14:24 PDT FATAL: database
files are i
On 8/27/2014 2:17 PM, Prabhjot Sheena wrote:
Database postgresql 8.4
i shutdown the database and restarted database and now its not
starting and i m getting this error
[caesius@dbtest05 pg_log]$ 2014-08-27 14:14:24 PDT FATAL: database
files are incompatible with server
2014-08-27 14:14:24
Database postgresql 8.4
i shutdown the database and restarted database and now its not starting and
i m getting this error
[caesius@dbtest05 pg_log]$ 2014-08-27 14:14:24 PDT FATAL: database
files are incompatible with server
2014-08-27 14:14:24 PDT DETAIL: The database cluster was initiali
On 08/27/2014 11:59 AM, Ramesh T wrote:
In oracle I ran the deletion script to clean up the particular database
using custid.custid is the parameter .&&1 is used in the oracle Inthe
same way tried but $1 not possible ?but using function is possible is
their any problem with fun to Clean the data
Hi
psql variables has different format and its is not directly related to psql
options. But you can do:
[pavel@localhost ~]$ psql postgres --set=myproname=upper
psql (9.5devel)
Type "help" for help.
postgres=# select proname, prosrc from pg_proc where proname = :'myproname';
proname | prosrc
On 8/27/2014 11:59 AM, Ramesh T wrote:
In oracle I ran the deletion script to clean up the particular
database using custid.custid is the parameter .&&1 is used in the
oracle Inthe same way tried but $1 not possible ?but using function is
possible is their any problem with fun to Clean the da
In oracle I ran the deletion script to clean up the particular database
using custid.custid is the parameter .&&1 is used in the oracle Inthe same
way tried but $1 not possible ?but using function is possible is their any
problem with fun to Clean the database I have 100 statements in script ...
On
Dennis writes:
> Hi, I am having bad luck with a query that should return zero rows but
> actually never returns (completes execution.)
Seems like you need a multicolumn index on t_week_f, and maybe also on
nb_products, so that the conditions shown as "filters" here could be
applied as index con
Oh ya…
select fact.store_tag,fact.period,fact.upc upcid,
case when mkt_tag = 4480 then market.description else '' end retailmarket,
case when mkt_tag = 100 then market.description else '' end compmarket,
case when mkt_tag = 4480 then dollars else 0 end base_dollars,
case when mkt_tag = 100 then do
On 08/27/2014 11:02 AM, Dennis wrote:
Hi, I am having bad luck with a query that should return zero rows but
actually never returns (completes execution.)
And the query is :) ?
--
Adrian Klaver
adrian.kla...@aklaver.com
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
Hi, I am having bad luck with a query that should return zero rows but actually
never returns (completes execution.)
When I broaden the ‘between’ clause range from " period.orderno between 1447
and 1450" to " period.orderno between 1446 and 1450” the query plan changes and
the query never compl
Ramesh T wrote
> Hi,
> I have deletion script to delete particular cust from
> database.I was
> saved a file name with custde.sql.i need to run from command line like
> putty tool..But have a problem
>
> example :
>
> delete from part where part.custid=$1;
>
> when i ran custde.sql f
On 08/27/2014 08:24 AM, Ramesh T wrote:
any help...
Honestly, this is basic programming/scripting. I would suggest picking
up an introductory programming book to get the basics down.
In the meantime, you have used a parameter variable ($1) with out
actually supplying a parameter. So Postgres
In need of some help - The use case is to insert current time in UTC for a
timestamp column
using COPY command . It works fine if i just have now() in csv file input.
But if i add
now() at time zone 'utc' it gives the error as
ERROR: invalid input syntax for type timestamp: "now() at time zone
Hi,
I have deletion script to delete particular cust from
database.I was
saved a file name with custde.sql.i need to run from command line like
putty tool..But have a problem
example :
delete from part where part.custid=$1;
when i ran custde.sql from putty tool
db=#\i custde.sql
it
Hi,
I'd like to add to my former mail that currently I have got pgbouncer
running and I can connect to the underlying postgres database servers, but
how can I access the pgbouncer database when I'm not running a postgres
server on the VM where the pgbouncer is installed? In all the forums and
docum
swaroop wrote
> In need of some help - The use case is to insert current time in UTC for a
> timestamp column
> using COPY command . It works fine if i just have now() in csv file input.
> But if i add
> now() at time zone 'utc' it gives the error as
> ERROR: invalid input syntax for type timest
2014-08-22 9:05 GMT+02:00 David G Johnston :
>
> Do you have a use-case you'd like to share or is this curiosity after
> accidentally finding out that 'now'::timestamp actually works?
>
I've found it by accident and I had to ask if it is bug or right way.
>
--
Piotr Gasidło
Hi,
thanks, you're right. My description wasn't very concrete. Our current set
up is a single pgbouncer instance running on a VM in the same network like
the webapplications. The database servers are in another firewall protected
network. So the pgbouncer is now running on a standalone VM. I was
w
30 matches
Mail list logo