Are these supported??

Поиск
Список
Период
Сортировка
От Vince Vielhaber
Тема Are these supported??
Дата
Msg-id Pine.BSF.4.61.1608162313170.56343@chives.michvhf.com
обсуждение исходный текст
Ответы Re: Are these supported??  (Greg Stark <stark@mit.edu>)
Re: Are these supported??  (Craig Ringer <craig@2ndquadrant.com>)
Список pgsql-hackers
Hi all, been awhile!  Some may be saying "not long enough" but eh.

I recently moved a mybb forum away from mysql to postgres.  Along the way 
I encountered a couple of things that either didn't seem to be supported 
or I'm just not doing it right.

First, the server this is on is running version 8.4.22.  php is 5.6.22.

#1 Are joins supported in deletes?  The same join syntax works fine as
a select.

#2 is extract supported in a select statement dealing with a table?  To 
explain this one, here is the error I get:

# select date_part('epoch', dateline) from mybb_adminlog limit 1;ERROR: 
function date_part(unknown, integer) does not exist
LINE 1: select date_part('epoch', dateline) from mybb_adminlog limit...               ^
HINT:  No function matches the given name and argument types. You might 
need to add explicit type casts.
#

or ...

# select extract(epoch from timestamp dateline::timestamp) from 
mybb_adminlog limit 1;
ERROR:  syntax error at or near "dateline"
LINE 1: select extract(epoch from timestamp dateline::timestamp) fro...
#

Doesn't matter if I use epoch or day or anything else, they all fail with 
the same error.  And yes, dateline is a timestamp.  WITH or WITHOUT 
timezone made no difference.

So my questions are..

Does Postgres not support joins in deletes?

If not, is there a reason?


Is EXTRACT and/or date_part not supported in select calls where a table is 
involved?

If not, is there a reason or a work around for selecting the epoch of a 
timestamp?


Thanks!!!  Miss you guys!!!
Vince.





В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ryan Murphy
Дата:
Сообщение: Re: Patch: initdb: "'" for QUOTE_PATH (non-windows)
Следующее
От: roshan_myrepublic
Дата:
Сообщение: How to do failover in pglogical replication?