On Wed, Jul 17, 2013 at 9:29 AM, Carla Goncalves cgourof...@hotmail.comwrote:
Hi
I would like to list the definition of all user tables by only one
command. Is there a way to *not* show pg_catalog tables when using \d .
in PostgreSQL 9.1.9?
Thanks.
I didn't see a way to do that with \
If a query returns, say the following results:
id value
0 a
0 b
0 c
1 a
1 b
How do I just choose a preferred element say value 'a' over any other
elements returned, that is the value returned is from a subquery to a
larger query?
Thanks.
DISTINCT ON (id) ... ORDER BY value”. The database
will sort the query results before running them through the DISTINCT filter.
On Fri, Dec 21, 2012 at 11:31 AM, Wes James compte...@gmail.com wrote:
If a query returns, say the following results:
id value
0 a
0 b
0 c
1
Thanks. I was testing different things and I came up with something
similar to that. I appreciate you taking time to answer.
On Fri, Dec 21, 2012 at 11:22 AM, Scott Marlowe scott.marl...@gmail.comwrote:
On Fri, Dec 21, 2012 at 10:28 AM, Wes James compte...@gmail.com wrote:
David and Seth
On Wed, Jun 20, 2012 at 8:42 AM, Emi Lu em...@encs.concordia.ca wrote:
Good morning,
Is there a simply method in psql to format a string?
For example, adding a space to every three consecutive letters:
abcdefgh - *** *** ***
Thanks a lot!
Emi
I looked at format here:
On Mon, May 14, 2012 at 4:42 PM, Wes James compte...@gmail.com wrote:
I have postgresql 9.1.3 on a mac and on linux.
On the mac the results come out:
! *`-=[];',./~@#$%^()_+{}|:?\
then
\--\
On ubuntu 12.04 x64 it comes out (compiled and installed postgres from
tbz2 from postgresql.org
Back to the drawing board. Windows sorts these lines thus (postgresql
9.1.3):
! *`-=[];',./~@#$%^()_+{}|:?\
!!
!a
!A
!B
!ia
!test
\--\
African agricultural research and technological development
on the ascii table here:
http://www.ascii-code.com/
upper case letters should sort before
On Mon, May 14, 2012 at 5:00 PM, Tom Lane t...@sss.pgh.pa.us wrote:
Wes James compte...@gmail.com writes:
Why is there a different order on the different platforms.
This is not exactly unusual. You should first check to see if
lc_collate is set differently in the two installations
On Wed, May 16, 2012 at 5:00 PM, Samuel Gendler
sgend...@ideasculptor.comwrote:
On Wed, May 16, 2012 at 3:46 PM, Wes James compte...@gmail.com wrote:
On Mon, May 14, 2012 at 5:00 PM, Tom Lane t...@sss.pgh.pa.us wrote:
Wes James compte...@gmail.com writes:
Why is there a different order
On Mon, May 14, 2012 at 5:00 PM, Tom Lane t...@sss.pgh.pa.us wrote:
Wes James compte...@gmail.com writes:
Why is there a different order on the different platforms.
This is not exactly unusual. You should first check to see if
lc_collate is set differently in the two installations
On Mon, May 14, 2012 at 5:00 PM, Tom Lane t...@sss.pgh.pa.us wrote:
Wes James compte...@gmail.com writes:
Why is there a different order on the different platforms.
This is not exactly unusual. You should first check to see if
lc_collate is set differently in the two installations
On Mon, May 14, 2012 at 5:00 PM, Tom Lane t...@sss.pgh.pa.us wrote:
Wes James compte...@gmail.com writes:
Why is there a different order on the different platforms.
This is not exactly unusual. You should first check to see if
lc_collate is set differently in the two installations
On Tue, May 15, 2012 at 10:16 AM, Scott Marlowe scott.marl...@gmail.com wrote:
On Tue, May 15, 2012 at 10:06 AM, Wes James compte...@gmail.com wrote:
On Mon, May 14, 2012 at 5:00 PM, Tom Lane t...@sss.pgh.pa.us wrote:
Wes James compte...@gmail.com writes:
Why is there a different order
I have postgresql 9.1.3 on a mac and on linux.
On the mac the results come out:
! *`-=[];',./~@#$%^()_+{}|:?\
then
\--\
On ubuntu 12.04 x64 it comes out (compiled and installed postgres from
tbz2 from postgresql.org repo):
\--\
then
! *`-=[];',./~@#$%^()_+{}|:?\
Why is there a different
On Fri, May 11, 2012 at 1:03 PM, Carlos Mennens
carlos.menn...@gmail.com wrote:
I have a problem in SQL I don't know how to solve and while I'm sure
there are 100+ ways to do this in ANSI SQL, I'm trying to find the
most cleanest / efficient way. I have a table called 'users' and the
field
Yes. Thanks to all that responded. That was it.
-wes
On Mon, Aug 1, 2011 at 5:01 PM, Steve Crawford
scrawf...@pinpointresearch.com wrote:
On 08/01/2011 03:50 PM, Wes James wrote:
select count(*) from table;
count
---
100
(1 row)
is correct
select count(*) from table where
select count(*) from table;
count
---
100
(1 row)
is correct
select count(*) from table where col::text ~~* '%text%';
count
---
1
(1 row)
is correct.
But now if I do:
select count(*) from table where col::text !~~* '%text%';
count
---
98
(1 row)
Shouldn't it be 99?
of the string you are searching
forIt appears to be much faster from my experience to search for
ab% than it is to search for %ab%.
On Tue, Jul 12, 2011 at 7:51 PM, Wes James compte...@gmail.com wrote:
I'm using Erlang and postgresql to build a web interface. When I
create the query string I get
On Tue, Jul 12, 2011 at 2:33 AM, B.Rathmann b.rathm...@ping.de wrote:
Hello,
I've been trying to find out how to find out which sql was run to create
a certain table. As I need this in a program which may access the
database remotely, using pg_dump --schema-only or psql is not an option
On Tue, Jul 12, 2011 at 2:33 AM, B.Rathmann b.rathm...@ping.de wrote:
Hello,
I've been trying to find out how to find out which sql was run to create
a certain table. As I need this in a program which may access the
database remotely, using pg_dump --schema-only or psql is not an option
(the
I'm using Erlang and postgresql to build a web interface. When I
create the query string I get something like:
select * from table where field::text ilike '%%'
But when I do that (if someone types in '\' for part of the text
search), I get a pg log entry to use E'\\'
How would I use E''
I'm trying to do this:
select * from table where field::text ilike '%\_%';
but it doesn't work.
How do you escape the _ and $ chars?
The docs say to use \, but that isn't working.
( http://www.postgresql.org/docs/8.3/static/functions-matching.html )
The text between '%...%' can be longer,
On Wed, Jul 28, 2010 at 12:47 PM, Justin Graf jus...@magwerks.com wrote:
On 7/28/2010 12:35 PM, Wes James wrote:
I'm trying to do this:
select * from table where field::text ilike '%\_%';
but it doesn't work.
How do you escape the _ and $ chars?
The docs say to use \, but that isn't
Thanks Douglas and Tom - I missed that second \.
-wes
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
On Wed, Jul 28, 2010 at 12:15 PM, Little, Douglas
douglas.lit...@orbitz.com wrote:
Wes.
You probably missed the part in bold. You need to double the backslash.
select 'ab5c' like '%\_c'
t
Why doesn't this work?
select * from table where field::text ilike '%\\\%'
WARNING: nonstandard
On Thu, Jun 3, 2010 at 11:54 PM, A. Kretschmer
andreas.kretsch...@schollglas.com wrote:
In response to Wes James :
In the statement:
select
MAX(page_count_count) - MIN(page_count_count) as day_tot,
MAX(page_count_count) as day_max, sum(MAX(page_count_count) -
MIN(page_count_count
In the statement:
select
MAX(page_count_count) - MIN(page_count_count) as day_tot,
MAX(page_count_count) as day_max, sum(MAX(page_count_count) -
MIN(page_count_count)) as tot,
page_count_pdate
from page_count
group by page_count_pdate order by page_count_pdate
Is there a way to do
I am grabbing a printer total and putting it in a table. The
page_count is continuously increasing:
page_count_countpage_count_pdate
10 2010-05-10
20 2010-05-10
40 2010-05-11
60
On Wed, Jun 2, 2010 at 10:55 AM, Oliveiros
oliveiros.crist...@marktest.pt wrote:
Hi,
Have you already tried this out?
select MAX(page_count_count) - MIN(page_count_count) from page_count group
by page_count_pdate.
Best,
Oliveiros
Oliveiros,
Thx that mostly works. I just tried it and
On Wed, Jun 2, 2010 at 2:44 PM, Justin Graf jus...@magwerks.com wrote:
On 6/2/2010 12:31 PM, Wes James wrote:
On Wed, Jun 2, 2010 at 10:55 AM, Oliveiros
oliveiros.crist...@marktest.pt wrote:
Hi,
Have you already tried this out?
select MAX(page_count_count) - MIN(page_count_count) from
I have two tables:
students
stu_name
schols_selected
scholarships
schol_name
short_name
schols_selected is made up of scholarships the students have selected,
the field content will look like schol1:schol2:schol3
I need a select that does something like this
select schol_name,
31 matches
Mail list logo