On Mon, Jan 21, 2013 at 9:33 PM, Tom Lane wrote:
>> test=# select * from foo1;
>> (No rows)
>> Time: 1012.567 ms
>
> How did you get that? I don't believe it's possible in the default
> output format.
Oh I see, it's because I have \x auto in my .psqlrc. If I set \x auto
or \x on then it says "(N
Marti Raudsepp writes:
> Interestingly, PostgreSQL 9.2 has regressed here. Not sure if we care,
> but worth mentioning:
Regressed? The output looks the same to me as it has for some time.
> test=# select * from foo1;
> (No rows)
> Time: 1012.567 ms
How did you get that? I don't believe it's p
On Tue, Jan 15, 2013 at 5:47 AM, Gurjeet Singh wrote:
> postgres=# select * from test_0_col_table ;
> --
> (20 rows)
Interestingly, PostgreSQL 9.2 has regressed here. Not sure if we care,
but worth mentioning:
psql (9.2.2)
test=# select count(*) from foo1;
count
--
1000
(1 ro
On Tue, Jan 15, 2013 at 2:26 PM, Shaun Thomas wrote:
> Let's see what EnterpriseDB produces:
>
> test=> select * from dual;
>
> dummy
> ---
> X
> (1 row)
Hey, don't blame us. We didn't come up with this bad idea ... just
trying to make life easier for those who are used to it.
--
Robert
On 01/15/2013 01:18 PM, Bruce Momjian wrote:
AFAICR, 'dual' table has one column named 'DUMMY' and one row with
value, single character X.
How elegant. :-(
Let's see what EnterpriseDB produces:
test=> select * from dual;
dummy
---
X
(1 row)
Yep, elegant gets my vote. ;) But then ag
On Mon, Jan 14, 2013 at 10:25:39PM -0500, Gurjeet Singh wrote:
> On Mon, Jan 14, 2013 at 3:09 PM, David Johnston wrote:
>
> What does "SELECT * FROM dual" in Oracle yield?
>
>
> AFAICR, 'dual' table has one column named 'DUMMY' and one row with value,
> single character X.
How elegant. :-
On Mon, Jan 14, 2013 at 10:47:58PM -0500, Gurjeet Singh wrote:
> Interesting to note that SELECT * FROM table_with_zero_cols does not complain
> of anything.
>
> postgres=# select * from test1;
> --
> (0 rows)
>
> This I believe result of the fact that we allow user to drop all columns of a
> ta
Gurjeet Singh writes:
> On Mon, Jan 14, 2013 at 4:15 PM, Tom Lane wrote:
>> David Johnston writes:
>>> SELECT *;
>>> Results in:
>>> SQL Error: ERROR: SELECT * with no tables specified is not valid
> Interesting to note that SELECT * FROM table_with_zero_cols does not
> complain of anything.
On Mon, Jan 14, 2013 at 11:03 PM, Alvaro Herrera
wrote:
> Gurjeet Singh escribió:
>
> > Interesting to note that SELECT * FROM table_with_zero_cols does not
> > complain of anything.
> >
> > postgres=# select * from test1;
> > --
> > (0 rows)
> >
> > This I believe result of the fact that we allow
Gurjeet Singh escribió:
> Interesting to note that SELECT * FROM table_with_zero_cols does not
> complain of anything.
>
> postgres=# select * from test1;
> --
> (0 rows)
>
> This I believe result of the fact that we allow user to drop all columns of
> a table.
>
> On a side note, Postgres allo
On Mon, Jan 14, 2013 at 4:15 PM, Tom Lane wrote:
> David Johnston writes:
> > Tom Lane-2 wrote
> >> For that to return zero, it would also be necessary for "SELECT 2+2"
> >> to return zero rows. Which would be consistent with some views of the
> >> universe, but not particularly useful.
>
> > G
On Mon, Jan 14, 2013 at 3:09 PM, David Johnston wrote:
> What does "SELECT * FROM dual" in Oracle yield?
>
AFAICR, 'dual' table has one column named 'DUMMY' and one row with value,
single character X.
--
Gurjeet Singh
http://gurjeet.singh.im/
David Johnston writes:
> Tom Lane-2 wrote
>> For that to return zero, it would also be necessary for "SELECT 2+2"
>> to return zero rows. Which would be consistent with some views of the
>> universe, but not particularly useful.
> Given that:
> SELECT *;
> Results in:
> SQL Error: ERROR: SELE
Tom Lane-2 wrote
> Gurjeet Singh <
> singh.gurjeet@
> > writes:
>> Can somebody explain why a standalone count(*) returns 1?
>> postgres=# select count(*);
>> count
>> ---
>> 1
>> (1 row)
>
> The Oracle equivalent of that would be "SELECT count(*) FROM dual".
> Does it make more sense
On Sun, Jan 13, 2013 at 4:43 PM, Tom Lane wrote:
> Gurjeet Singh writes:
> > Can somebody explain why a standalone count(*) returns 1?
> > postgres=# select count(*);
> > count
> > ---
> > 1
> > (1 row)
>
> The Oracle equivalent of that would be "SELECT count(*) FROM dual".
> Does it m
Gurjeet Singh writes:
> Can somebody explain why a standalone count(*) returns 1?
> postgres=# select count(*);
> count
> ---
> 1
> (1 row)
The Oracle equivalent of that would be "SELECT count(*) FROM dual".
Does it make more sense to you thought of that way?
> I agree it's an odd thin
16 matches
Mail list logo