osted was claimed to be GPL, although there
isn't any notice at all in the source that I saw.
Does the PHP license require programs that dynamically link carry their
license, similar to GPL (I didn't get that impression)? If not, then
something like PL/PHP should be licensable
w.php?version=7.3&idoc=0&file=xfunc-c.html
HTH,
Joe
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
different pg_proc entries and get the desired
effect, at some tedium.
Joe Conway has posted a few examples using this approach, IIRC.
See contrib/dblink in 7.4beta -- there are several functions using this
method, e.g. dblink_connect().
Joe
---(end of broadcast
;
?column?
---
{{1,2,3},{4,5,6}}
(1 row)
Offhand, I would think that '{1,2,3,4,5,6}' would be what I'd
intuitively expect to get from "concatenating" these arrays.
Joe, do we really have this implemented per spec?
Hmmm, it made sense to me, at at least at some point ;
t.end then
t.login else 'None' end as log from my_table t) as ss order by lower(log);
HTH,
Joe
---(end of broadcast)---
TIP 8: explain analyze is your friend
ught to be higher, by all means do
so. But you'll have to convince quite a few people who have no need for
greater than 32 arguments why they should suffer a performance hit just
because you do.
Joe
---(end of broadcast)---
TIP 6: Have you se
Alex wrote:
Joe, that is good news.
When will be 7.4 availbable?
Beta2 is just starting. There isn't a firm date for the 7.4 release that
I'm aware of, but start looking for it in mid-September.
Also,
what i actually wanted is to ckeck that if lets say ARRAY[1,2,3]
is inserted bu
that need to take place
across databases? Or should I add a uid/gid to all necessary tables, create
indexes and update all necessary where clauses? Ideas?
What about using schemas?
Joe
---(end of broadcast)---
TIP 2: you can get off all lists at
#x27;'''''' loop
return next ytd_record ;
end loop;
end loop;
return;
end' LANGUAGE 'plpgsql' VOLATILE;
test=# select * from get_factory_ytd() as (tare float8, delivery_date date);
tare| delivery_
ou need examples.
unless someone can magically make the default PostgreSQL version on RH
7.3 change to a newer version of PostgreSQL, then a newer version can't
be used]
Why not? I have Postgres 7.3.4 running on my RH 7.3 server. Here are RH
7.3 RPMs:
ftp://ftp8.us.postgresql.org/pub/pgsql/binar
only a small chance of finding more than one row that matches.
This is an interesting idea. Alternatively just use bytea and store the
16 bytes directly (i.e. no hex or base64 encoding). There is b-tree
index support for bytea.
Joe
---(end of broadcast
few
years ago. We never got to the point where we really needed that kind of
scalability, but it worked pretty well in (limited) testing.
Joe
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send &
BenLaKnet wrote:
I use postgresql 7.2.3
How can I use connectby ??
Must I install files ? or packages ? or it is recommanded to upgrade
dataserver ?
You need to upgrade. Either install 7.3.4 or wait a few weeks and
install 7.4 when it is released.
Joe
---(end of
ation of a user defined composite type will not create
a corresponding array type.
Joe
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
and a release date?
AFAIK, the only PLs that support returning multiple rows at the moment
are SQL, PL/pgSQL, and PL/R.
Joe
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
or complex string parsing, etc.
HTH,
Joe
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html
Christopher Murtagh wrote:
On Tue, 2003-11-11 at 00:07, Joe Conway wrote:
Write a Pl/Perl function that just does the syscall, and call it from
PL/pgSQL. Similarly for complex string parsing, etc.
That would work if I could get the Pl/Perl function to return an array
or set of results, but this
Joe Conway wrote:
Christopher Murtagh wrote:
That would work if I could get the Pl/Perl function to return an array
or set of results, but this brings me back to the original problem
(unless I'm missing something obvious).
Sorry, I guess I didn't sufficiently understand the issu
Alvaro Herrera wrote:
Well, I wasn't the OP ;-). I thought Tcl had the capability, as it is
sometimes said to be the most advanced PL.
Nah, that would be PL/R ;-)
Joe
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please
eason, i.e.:
M
/ \
/ \
Sa Sb
/ \ / \
Sc Sd Se Sf
What happens if data is successfully replicated to Sa, Sb, Sc, and Sd,
and then an exception/rollback occurs on Se?
Joe
---(end of
27;m using a
hacked copy of dbmirror at the moment.
First, it does not replicate single transactions. It replicates batches
of them together. Since the transactions are already committed (and
possibly some other depending on them too), there is no way - you loose Se.
URN NEXT i;
END LOOP;
RETURN;
END;
' LANGUAGE 'plpgsql' STRICT IMMUTABLE;
regression=# select * from test(4, 8);
test
--
4
5
6
7
8
(5 rows)
HTH,
Joe
---(end of broadcast)---
TIP 7: don't forget t
ently updated'.
HTH,
Joe
---(end of broadcast)---
TIP 8: explain analyze is your friend
g_attribute,pg_class,pg_inherits,pg_index,pg_operator,pg_opclass,pg_am,pg_amop,pg_amproc,pg_language,pg_largeobject,pg_aggregate,pg_trigger,pg_listener,pg_cast,pg_namespace,pg_conversion,pg_depend,pg_attrdef}
public | {foo,mytable,fw_chain}
(4 rows)
Time: 2.518 ms
HTH,
Joe
---
);
}
CREATE OR REPLACE FUNCTION xp_shellexec(text)
RETURNS int
AS '$libdir/shell_exec','shell_exec'
LANGUAGE 'C' VOLATILE STRICT;
SELECT xp_shellexec('mkdir /tmp/testing123');
[EMAIL PROTECTED] tmp]# ls -ld /tmp/test*
drwx--2 postgres postgres 409
r for bytea, because the bug
has been there since the feature was originally committed.
Joe
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that
is just that,
teach the optimizer how to do better with set-returning SQL functions.
Joe
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
ent dblink connection. In
that case, execute dblink_connect() before you execute your queries. Use
named persistent connections if you need more than one, anonymous otherwise.
HTH,
Joe
---(end of broadcast)---
TIP 2: you can get off all lists at onc
he
server and not some client application assosciated with PG.
FYI, deleting the answer file in the db directory seemed to alleviate my
problem. But obviously that is highly highly highly unacceptable.
Thanks,
-Joe
on.
-GRANTED- that a transaction can be aborted at anytime, and the
application programmer should plan for that, but I think this postgre
"feature" will cause transactions to be aborted unnecessarily;
especially if people migrate from another database to postgre.
Ofcourse, people really shouldn't be inserting objects which already
exist, but it would still be an inconsistency between Postgre and all
the other DBAdapters.
Thoughts?
-Joe
I have a table with over 1,000,000 records in it containing names and phone
numbers, and one of the indexes on the table is a unique index on the phone
number. I am trying to copy about 100,000 more records to the table from a
text file, but I get an error on copying because of duplicate phone nu
uld not find anything useful. I would really
appreciate some help. Thanks in advance!
(English is not my first language so I apologize if there are mistakes or
I'm not being very clear.)
Joe L.F.
On Wed, Oct 13, 2010 at 16:06, Merlin Moncure wrote:
>
> On Wed, Oct 13, 2010 at 5:24 AM, Joe La Frite wrote:
> > Hi everyone,
> > I'm trying to use libpq in my application, but it crashes with a seg fault
> > when trying to connect. The call stack is as
I came across http://bonesmoses.org/2014/05/14/foreign-keys-are-not-free/
which seems to indicate so.
When I run the following test script, having 50 foreign keys takes
about twice as long to do the update. Is there a reason for that?
Seems like the RI triggers wouldn't have to run on updates if t
On Wednesday, May 21, 2014, Jeff Janes wrote:
>
> On Wed, May 21, 2014 at 1:11 PM, Joe Van Dyk
>
> > wrote:
>
>> I came across http://bonesmoses.org/2014/05/14/foreign-keys-are-not-free/
>> which seems to indicate so.
>>
>> When I run the following
On Thu, May 22, 2014 at 10:52 AM, Tom Lane wrote:
> Jeff Janes writes:
>> On Wed, May 21, 2014 at 7:48 PM, Joe Van Dyk wrote:
>>> I was expecting that the RI update triggers would have a "when (new.key is
>>> distinct from old.key)" condition on them, wh
I have a large table that I don't want to lock for more than couple
seconds. I want to add a nullable column to the table, the type of the
column is a domain with a check constraint.
It appears that the check constraint is being checked for each row, even
though the column can be nullable? Is ther
On Tue, Aug 19, 2014 at 3:10 PM, Joe Van Dyk wrote:
> I have a large table that I don't want to lock for more than couple
> seconds. I want to add a nullable column to the table, the type of the
> column is a domain with a check constraint.
>
> It appears that the check
On Tue, Aug 19, 2014 at 3:16 PM, Joe Van Dyk wrote:
> On Tue, Aug 19, 2014 at 3:10 PM, Joe Van Dyk wrote:
>
>> I have a large table that I don't want to lock for more than couple
>> seconds. I want to add a nullable column to the table, the type of the
>> co
On Tue, Aug 19, 2014 at 3:20 PM, Joe Van Dyk wrote:
> On Tue, Aug 19, 2014 at 3:16 PM, Joe Van Dyk wrote:
>
>> On Tue, Aug 19, 2014 at 3:10 PM, Joe Van Dyk wrote:
>>
>>> I have a large table that I don't want to lock for more than couple
>>> second
Is it possible to get this query (or a similar one) to use an index?
I want to return all rows that have a value of less than 10. I have
arbitrary keys I want to check (not just 'a').
drop table if exists test;
create table test (j jsonb);
insert into test select json_build_object('a', i)::json
On Tue, Sep 2, 2014 at 9:55 PM, Peter Geoghegan wrote:
> On Tue, Sep 2, 2014 at 9:38 PM, Joe Van Dyk wrote:
> > I want to return all rows that have a value of less than 10. I have
> > arbitrary keys I want to check (not just 'a').
>
>
> If you created an expre
e than a minute or so), replication updates are paused.
Is there a way to fix this?
Thanks,
Joe
nge('2014-1-2', '2014-1-3')),
(tstzrange('2014-1-2', '2014-1-4')),
(tstzrange('2014-1-5', '2014-1-6'));
-- want back:
-- tstzrange('2014-1-1', '2014-1-4')
-- tstzrange('2014-1-6', '2014-1-6')
Thanks,
Joe
On Fri, Oct 24, 2014 at 11:02 AM, David G Johnston <
david.g.johns...@gmail.com> wrote:
> John McKown wrote
> >> insert into sales values
> >> (tstzrange('2014-1-1', '2014-1-2')),
> >> (tstzrange('2014-1-2', '2014-1-3')),
> >> (tstzrange('2014-1-2', '2014-1-4')),
> >> (tstzrange('2014-1-5'
ld use a LEFT JOIN with itself:
>
> WITH RECURSIVE explode(times) AS (
> SELECT times
> FROM sales
> UNION
> SELECT a.times + b.times
> FROM explode a
> JOIN sales b ON b.times && a.times OR b.times -|- a.times
> )
> SELECT a.times
> FROM explode a
> LEFT JOIN explode b ON b.times @> a.times AND b.times != a.times
> WHERE b.times IS NULL
> ORDER BY a.times
>
Perfect! Thanks! Now I just need to understand how that works.. :)
Joe
lave that works is in the same data center as the master -- not sure
if that's related at all.
Joe
bout the oom killer, but rather about
why just one of the slaves is reporting the "invalid contrecord length"
error.
> I hope that's helpful.
>
> Regards,
> basti
>
> On Sat 25.10.2014 22:55 +0200, Joe Van Dyk wrote:
> > One of my postgres backends was killed by
On Tue, Oct 28, 2014 at 7:43 AM, Andres Freund
wrote:
> On 2014-10-25 13:55:57 -0700, Joe Van Dyk wrote:
> > One of my postgres backends was killed by the oom-killer. Now, one of my
> > streaming replication slaves is reporting "invalid contrecord length 2190
> > at A6C
On Mon, Oct 27, 2014 at 6:22 AM, Emanuel Calvo <
emanuel.ca...@2ndquadrant.com> wrote:
>
> El 23/10/14 a las 17:40, Joe Van Dyk escibió:
> > Hi,
> >
> > I have a master and a slave database.
> >
> > I've got hot_standby_feedback turned on,
> >
Hi,
Any estimates on when 9.3.6 will be released? We've been running off
9-3-stable for the past five months, as there's some fixes in there that we
need.
Thanks,
Joe
rgest tables after the first DB shutdown.
>
One thing to check (I ran into this two weeks ago) -- even though vacuums
were happening, a query running on a standby machine was preventing the
vacuum process from removing the dead rows. You may want to check for bloat
or use 'vacuum verbose' to see if there's many dead rows not being cleaned
up.
Joe
this typically done?
Thanks,
Joe
On Thu, Feb 14, 2013 at 6:31 PM, Jack Christensen
wrote:
> Joe Van Dyk wrote:
>
>> See https://gist.github.com/**joevandyk/4957646/raw/**
>> 86d55472ff8b5a4a6740d9c673d18a**7005738467/gistfile1.txt<https://gist.github.com/joevandyk/4957646/raw/86d55472ff8b5a4a6740d9c673d18
On Fri, Feb 15, 2013 at 7:43 AM, Tom Lane wrote:
> Joe Van Dyk writes:
> > Perhaps I fat-fingered something somewhere... I tried that and I got
> this:
> >
> https://gist.github.com/joevandyk/4958906/raw/5561f95ef2b5d82f81ab14913c4d36f6aac3ee0a/gistfile1.txt
>
> Try w
My assumption was that WITH acted just like subselects, but apparently they
don't? Using WITH doesn't use the expected index.
(the below also at:
https://gist.github.com/joevandyk/839413fac7b3bdd32cb3/raw/cec015d16bed7f4e20ab0101b58ae74a1df1cdc2/gistfile1.txt
create view promotion_details1 as (
On Tue, Feb 19, 2013 at 1:02 AM, Albe Laurenz wrote:
> Joe Van Dyk wrote:
> > My assumption was that WITH acted just like subselects, but apparently
> they don't? Using WITH doesn't
> > use the expected index.
>
> Currently WITH acts as an "optimization f
Not sure if there's anything to be done here, just thought I'd post in case
anyone has any ideas. In an ideal world, I'd be able to write version #3.
Joe
Oops, fixing link.
https://gist.github.com/joevandyk/070e4728c4c9fe1bf086/raw/8b1ecf4b2d4fd127a22cb19abe948c29d78c2158/gistfile1.txt
summarizes the problem.
On Fri, Mar 8, 2013 at 4:17 PM, Joe Van Dyk wrote:
>
> https://gist.github.com/joevandyk/070e4728c4c9fe1bf0
Here's a much smaller self-contained example of the problem:
https://gist.github.com/joevandyk/06e1e26219726f11917e/raw/e9b279c2f2776d5825a6adbb04c7a41201f8cd24/gistfile1.txt
Joe
On Fri, Mar 8, 2013 at 4:17 PM, Joe Van Dyk wrote:
>
> https://gist.github.com/joevandyk/070e4728c4c9f
On Mar 12, 2013, at 8:42 AM, Perry Smith wrote:
I tried posting this from Google Groups but I did not see it come through
after an hour so this may be a duplicate message for some.
The current testing technique for things like Ruby On Rails has three
choices but all of the choices will not work
On Wed, Mar 13, 2013 at 8:47 AM, Steve Crawford <
scrawf...@pinpointresearch.com> wrote:
> On 03/12/2013 09:05 PM, Perry Smith wrote:
>
>> To all who replied:
>>
>> Thank you. ...
>>
>>
>> I had not seriously considered pg_dump / pg_restore because I assumed it
>> would be fairly slow but I will e
begin;
create table f (v numeric);
insert into f values (1), (0.8);
select ceil(v) as v from f group by v;
-- sorta expected the result to be grouped by the column alias,
-- not by the in the table
v
───
1
1
This is the correct behavior, right? To group by the column alias, I'd have
to use "g
On Mon, Apr 1, 2013 at 8:41 PM, Juan Pablo Cook wrote:
> Hi everyone! I need your help with this problem.
>
> I'm using PostgreSQL *9.2 Server* & the latest jdbc
> driver: postgresql-9.2-1002.jdbc4.jar
>
> I have a many to one relation. I have this piece of code:
>
> con.setAutoCommit(false); //t
On Mon, Apr 1, 2013 at 1:11 PM, Tim Uckun wrote:
>
>
>
> On Tue, Apr 2, 2013 at 8:35 AM, jesusthefrog wrote:
>
>> On the topic of 'natural' versus 'synthetic' primary keys, I am generally
>> in the camp that an extra ID field won't cost you too much, and while one
>> may not need it for a simple
On Tue, Apr 2, 2013 at 11:16 AM, Merlin Moncure wrote:
> On Tue, Apr 2, 2013 at 10:34 AM, Joe Van Dyk wrote:
> > On Mon, Apr 1, 2013 at 1:11 PM, Tim Uckun wrote:
> >>
> >>
> >>
> >>
> >> On Tue, Apr 2, 2013 at 8:35 AM, jesusthefrog
&g
On Wed, Apr 3, 2013 at 7:09 AM, Shaun Thomas wrote:
> Hey!
>
> So, Packt approached me a few months ago and asked me to put together a
> very basic series of short step-by-step instructions on backing up
> PostgreSQL. The title is "Instant PostgreSQL Backup and Restore How-to."
>
Links for those
# select tsrange(null)::tstzrange;
ERROR: cannot cast type tsrange to tstzrange
LINE 1: select tsrange(null)::tstzrange;
Is this expected?
select null::timestamp::timestamptz;
works fine.
Am I doing something silly? Or is the row-estimation for gist indexes not
even close in this case?
https://gist.github.com/joevandyk/503cc3d836ee5d101224/raw/c6fc53b2da06849d3d04effbd1c147fc36124245/gistfile1.txtor
code below:
-- This is not running inside a transaction.
drop table if exists f;
pipe files into psql (if it matters).
Joe
On Wed, Jul 3, 2013 at 6:43 AM, Oleg Bartunov wrote:
> It was my dream to have something we already have in shell -
>
> explain analyze !$
>
It would probably be: explain analyze !!
(at least in bash syntax)
Joe
>
> I think it should be not very difficult.
>
> Ole
I'd like the execution plan to be in the psql output, not in the postgres
log.
On Tue, Jul 2, 2013 at 11:20 PM, Andreas Kretschmer <
akretsch...@spamfence.net> wrote:
> Joe Van Dyk wrote:
>
> > I frequently need to analyze the last query in psql:
> > sel
Hi,
Is refreshing a materialized view in 9.3 basically:
delete from mat_view;
insert into mat_view select * from base_view;
Or is it more efficient? If no rows have changed, will new tuples be
written on a refresh?
Joe
On Thu, Jul 4, 2013 at 4:22 PM, Michael Paquier
wrote:
> On Fri, Jul 5, 2013 at 6:10 AM, Joe Van Dyk wrote:
> > Hi,
> >
> > Is refreshing a materialized view in 9.3 basically:
> >
> > delete from mat_view;
> > insert into mat_view select * from base_v
Also on 9.3 beta2.
On Thu, Jul 4, 2013 at 5:40 AM, Moshe Jacobson wrote:
> Confirmed reproducible on version 9.1 as well. Very odd.
>
>
> On Wed, Jul 3, 2013 at 1:30 PM, pg noob wrote:
>
>>
>> Hi all,
>>
>> I am trying to understand some odd locking behaviour.
>> I apologize in advance if this
create domain m numeric(5,2);
create table t (c m);
create function f(t) returns m as $ select case when true then $1.c end $
language sql;
psql:/tmp/t1.sql:3: ERROR: return type mismatch in function declared to
return m
DETAIL: Actual return type is numeric.
CONTEXT: SQL function "f"
It's looking like I can use a plpgsql function to insert data into a table
that violates a domain constraint. Is this a known problem?
Session 1:
create domain my_domain text check (length(value) > 2);
create table my_table (name my_domain);
create function f(text) returns void as $$
declare my_
Check
┼───┼──┼──┼───
public │ my_domain │ text │ │ CHECK (length(VALUE) > 5)
(1 row)
On Tue, Jul 9, 2013 at 4:05 PM, Joe Van Dyk wrote:
> It's looking like I can use a plpgsql function to insert data into a table
> that violates a domain constraint. Is this a known problem?
>
>
On Tue, Jul 9, 2013 at 4:29 PM, Adrian Klaver wrote:
> On 07/09/2013 04:05 PM, Joe Van Dyk wrote:
>
>> It's looking like I can use a plpgsql function to insert data into a
>> table that violates a domain constraint. Is this a known problem?
>>
>> Session 1:
run
whatever functions are necessary.
It would be super to let postgresql handle all of that.
Joe
On Thu, Jul 18, 2013 at 2:31 PM, Thomas Kellerer wrote:
> Joe Van Dyk wrote on 18.07.2013 23:23:
>
> Will the custom worker support in 9.3 let me put cron-like tasks into
>> postgresql?
>>
>> I have a lot of database functions that should run every few seconds,
>&g
On Thursday, July 25, 2013, Tim Spencer wrote:
> Hello there!
>
> I've seen lots of people who have asked questions about how to log
> this or that, but I have the opposite question! :-) I'm seeing this in my
> logs:
>
> Jul 25 18:08:11 staging-db11 postgres[27050]: [10-2] STATEMENT: cr
On Friday, July 5, 2013, Jeff Davis wrote:
> On Tue, 2013-06-11 at 14:05 -0700, Joe Van Dyk wrote:
> > # select tsrange(null)::tstzrange;
> > ERROR: cannot cast type tsrange to tstzrange
> > LINE 1: select tsrange(null)::tstzrange;
> >
> I agree that there should
Hi,
Any chance ip4r could be an official postgresql extension? It's got a lot
of advantages over the existing cidr/inet stuff.
https://github.com/RhodiumToad/ip4r-historical/blob/master/README.ip4r
Joe
Mostly just curious, as this is preventing me from using tab-separated
output. I'd like there to be a header in my files. I have to use CSVs
instead.
Joe
On Tue, Sep 3, 2013 at 1:41 PM, Martin Renters wrote:
> I'm trying to use timestamp ranges to keep track of the values particular
> items had over time, but I'm unable to create a table as follows:
>
> test=# create extension btree_gist;
> CREATE EXTENSION
> test=# create table v(item uuid, lifet
there be?
(I fixed the error by moving the before trigger to an after one.)
Joe
On Thu, Nov 21, 2013 at 6:11 PM, Tom Lane wrote:
> Joe Van Dyk writes:
> > I had a function that was set to SECURITY INVOKER. I needed to give
> access
> > to a view that uses this function to a role, so I made the function
> > SECURITY DEFINER.
>
> > The
I had a function that was set to SECURITY INVOKER. I needed to give access
to a view that uses this function to a role, so I made the function
SECURITY DEFINER.
The function is STABLE and is usually inlined and takes 2 ms to run.
Immediately, the function quit being inlined and took 1500ms to run
a from 3:30 am to 10 am, then
start complaining about missing WAL files.
What's the best way to avoid this problem? Increase wal_keep_segments?
Joe
)
On Wed, Dec 18, 2013 at 11:26 AM, Joe Van Dyk wrote:
> I'm running Postgresql 9.3. I have a streaming replication server. Someone
> was running a long COPY query (8 hours) on the standby which halted
> replication. The replication stopped at 3:30 am. I canceled the
> long-r
own date format, but
I'd really like to be able to use row_to_json and other functions without
specifying custom date formats everywhere.
Joe
On Fri, Dec 20, 2013 at 4:18 PM, Joe Van Dyk wrote:
> # select to_json(now());
> to_json
> -
> "2013-12-20 15:53:39.098204-08"
> (1 row)
>
> I'd like to see it output "2013-12-20T15:53:39.098204-08&quo
On Fri, Dec 20, 2013 at 4:24 PM, Joe Van Dyk wrote:
>
>
> On Fri, Dec 20, 2013 at 4:18 PM, Joe Van Dyk wrote:
>
>> # select to_json(now());
>> to_json
>> -
>> "2013-12-20 15:53:39.098204-08"
>> (1
ay to easily let
javascript applications parse json timestamps generated by postgresql in
row_to_json() statements.
On Fri, Dec 20, 2013 at 6:27 PM, Joe Van Dyk wrote:
> On Fri, Dec 20, 2013 at 4:24 PM, Joe Van Dyk wrote:
>
>>
>>
>> On Fri, Dec 20, 2013 at 4:18 PM, Joe Va
w());
insert into t values (default);
select row_to_json(t) from t;
row_to_json
---
{"id":1,"created_at":"2013-12-23 17:37:08.825935-08"}
On Mon, Dec 23, 2013 at 5:28 PM, Joe Van Dyk wro
On Wed, Dec 18, 2013 at 3:39 PM, Sergey Konoplev wrote:
> On Wed, Dec 18, 2013 at 11:26 AM, Joe Van Dyk wrote:
> > I'm running Postgresql 9.3. I have a streaming replication server.
> Someone
> > was running a long COPY query (8 hours) on the standby which halt
On Mon, Dec 30, 2013 at 10:27 AM, Sergey Konoplev wrote:
> On Mon, Dec 30, 2013 at 12:02 AM, Joe Van Dyk wrote:
> > On Sun, Dec 29, 2013 at 10:52 PM, Sergey Konoplev
> wrote:
> >> On Sun, Dec 29, 2013 at 9:56 PM, Joe Van Dyk wrote:
> >> > On Wed, Dec 18,
On Mon, Dec 30, 2013 at 9:11 PM, Sergey Konoplev wrote:
> On Mon, Dec 30, 2013 at 8:56 PM, Joe Van Dyk wrote:
> > On Mon, Dec 30, 2013 at 10:27 AM, Sergey Konoplev
> wrote:
> >> On Mon, Dec 30, 2013 at 12:02 AM, Joe Van Dyk wrote:
> >> > On Sun, Dec 29,
egards,
>> Szymon
>>
>
> In the custom stored function, I'm returning a resultset using hstore
> function.
> RETURN QUERY SELECT a few other columns, hstore(t.*) FROM table t WHERE
> condition.
>
> I don't want to change it to
>
> SELECT a few other columns, hstore('c1', CAST(t.c1 AS TEXT)) ||
> hstore('c2', CAST(t.c2 AS TEXT)) || ...hstore('cn', t.cn::text) || ...
> FROM table t WHERE condition.
>
Can you use json instead of hstore?
# select * from test;
id | b
+---
1 | t
2 | f
# select to_json(test) from test;
to_json
{"id":1,"b":true}
{"id":2,"b":false}
Joe
401 - 500 of 518 matches
Mail list logo